Wall mounted shelves are either fixed or adjustable. Fixed shelving is usually supported independently using two or more shelf brackets, which are attached to the wall and to the underside of the shelf.
Adjustable shelving, on the other hand, is carried on brackets that are slotted or clipped into vertical support strips screwed to the wall. In either case it’s important that wall supports be secured to a stud inside the wall, not just the drywall.
If you need only one shelf, the fixed brackets are probably the way to go. And they come in a variety of styles, shapes, and sizes; including models made of both metal and wood. The shelf boards can be made of natural wood or manufactured materials, which are usually available in pre-cut widths, or you can cut custom sizes from sheets of plywood or fiberboard.