If you are having a glass shelf, you could use silicon or rubber stoppers to fix the top edge in place. If it is a wooden shelf, you would need to drill these brackets. � they are easily drillable.
eBay