There are some glues in caulking tubes that would probably work.
Not Liquid Nails. You would have to place and glue the bottom, then
the sides and cut lengths of wood, 1x2 to wedge between the two
uprights. Tight enough to hold them tight against the wall or
shower enclosure. Letting the glue set at least overnight.