Thoroughly clean off all of the soap scum and wait for the surface to dry (otherwise, the bond might fail). Apply a strip of foam tape on each mounting flange, stopping one inch short of the ends.
A corner bathroom shelf was what I needed and I bought one ... shelving with drainage underneath to avoid stagnating water and soap scum collecting. I use adhesive, no-drill storage all over ...