Adding a small shelf where it will be useful
A useful shelf begins with a reachable location, suitable support and a defined load.

Give the shelf a specific job
A small shelf can hold the few things that otherwise crowd a surface. Decide what those things are before choosing its dimensions. A shelf for a couple of lightweight objects has different requirements from one for books, bottles or cookware.
Measure the items and leave room to lift them. A shallow shelf may fit a jar but not let your hand pass behind it. Consider the height from which it will be used and whether the objects can be seen without reaching blindly.
Check the wall and the instructions
The appropriate fixings depend on the wall construction, shelf design and intended load. Follow the manufacturer's installation instructions and use fittings suited to the actual wall. If you are unsure about the wall or hidden services, seek competent installation help rather than drilling by guesswork.
Do not treat an adhesive hook or decorative bracket as a substitute for the specified support. IKEA's wall-anchoring guidance highlights the importance of suitable wall attachment; the same basic buying question applies here: can this shelf be installed correctly in this location?
Leave the surrounding movement clear
A shelf near a door should not be struck when it opens. One above a desk should not put a hard edge where someone rises from a chair. Check the room with normal movements, including windows, curtains and cupboard doors.
Keep heavy or fragile items away from positions where a fall would cause harm, and stay within the shelf's stated load. Do not crowd it merely because there is unused width. The wall attachment and shelf both have limits, and the weight of the contents can be easy to underestimate.
Think about cleaning and change
A very narrow gap above another surface can collect dust while being difficult to wipe. Leave enough access for routine cleaning. If the shelf sits in a damp or splash-prone area, choose a product intended for those conditions and follow its care instructions.
Mark the proposed outline with removable paper before installation. Live with the visual position briefly and check reach. If the only suitable mounting point is inconvenient, a freestanding organiser may serve the task better.
A shelf is useful when it removes a repeated obstacle from a work surface. It need not become a display that demands more purchases to fill it. Start with the intended objects and leave the rest of the space available.