When mounting a shelf on a drywall, you need to use drywall anchors. These are metal plugs that expand on the backside of the wall.