Would a floating shelf might be considered?
Also could you possibly post a photograph to better see your situation and area of concern?
Having a visual might be helpful to be able to offer the best guidance .....to a help find the best suggestions or potential shelving option appropriate for your specific area.
How about something like this?
A photo would help. Is it wall mounted? Where is it located? Need more
Hi Robin. You could attach thin piece of wood on the left side and another one on the right side. Then lay the shelf on top of them. It would help if you use a level for this project to keep the shelf even. Good luck Robin.
Hi Robin, I'm not sure if you need a floating shelf or a shelf built into your bathroom cabinet. Perhaps this video tutorial will help - https://www.youtube.com/watch?v=OvnMSk_zPhQ
A really simple solution is to use a wire shelf rack that is designed to set in a cabinet. I used to have one that was made to fit in the corner of a cabinet to add extra shelving. This worked well because it didn't interfere with P-trap that hangs down
Here are some nice ones from Pinterest. From you project question I can't tell if this is to put under a vanity or to put on a wall. There are some nice suggestions from others for under both, here are some for on the wall also including hanging them from the existing cabinet:
I purchased a kit that is adjustable around the pipes in one cabinet. In another I used L brackets and added the shelves on each side. Attach the brackets to the side about 1/3 from the front and another 1/3 from the back. Cut a board the depth of the cabinet no wider than the placement of the pipes. Screw the shelf onto the brackets.
Hi ! I bought a plastic single drawer unit . This gave me a pull out drawer for storage ,
as well as space on top of the drawer , like a shelf .
they sell under counter shelves to give you more space like this one: https://amzn.to/38L31ML
Shelf pins are easy. You can get them anywhere. Just make sure your holes are level.