Over-the-wall shower shelf ends
thingiverse
Buy 4 of those "towel bar" square tubes from your local hardware store and install these on the ends. Now you have a shelf that can hang over your glass shower walls to keep your shampoo bottles in place. A little light tapping with a rubber mallet should make it snug for life, but I've designed slits in case you feel more secure putting a small screw or nail through the tubes to prevent them from slipping off. Here are some hooks and scunchy-holder parts that can slide onto the bars before assembly: https://www.thingiverse.com/thing:2089482. They won't interfere with the bottles sitting flat if you put them on the upper rails.
With this file you will be able to print Over-the-wall shower shelf ends with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Over-the-wall shower shelf ends.