If you have a saw and a drill, you can make your own shelf in less than an hour out of some 3/4 wood of your choice. Solid wood for everything, but you can use ply for the shelf itself.
Nice thing about making your own is you can measure your actual studs, which can vary, and build it to fit them dead-on.
-find and measure your studs, you'd want to do this anyway for a commercial shelf as suggested strongly above
-cut the shelf to fit that width, whether you're running across 2 or 3 studs, can go a bit past the outside studs for error correction.
-cut a backplate the same width as the shelf and 8-12" deep
-cut some supports to go between the two, shape them any way you want as long as they meet both the shelf and the backboard and will hold your fasteners
-put it all together with good screws in predrilled holes so you don't split anything
Shelf rides on top of backplate, those screws go down, then the screws go into the struts through the back of of the back plate and the top of the shelf.
Once it's all put together and sanded stained, etc. mount it on the wall. Good time to dust off that level and put it to use.
You can also reverse the mounting so the back plate and supports go upward and the shelf hangs.
I've built crude ones for putting bird feeders on in less than half an hour, and they've stood up to all kinds of animal abuse.