Place your shelf against the wall at the desired location. Mark the locations of the holes in the shelf's mounting brackets onto the wall with a pencil. Remove the shelf from the wall and set it aside.
Drill holes into the stone wall at the marked locations with a carbide-tipped drill bit. Make the holes as deep as your masonry wall anchors.
Place the wall anchors into the holes and tap them in flush with a hammer. Move the shelf back into position, lining up the holes in the shelf brackets with the anchors in the walls. Insert the screws through the holes in the brackets and into the anchors. Tighten the screws with a screwdriver until the shelf is tightly fastened to the wall.