Measure the width of your fireplace. Often mantels and shelves will extend beyond the fire box by as much as 12 inches on either side. The distance above the fire box also should be about 12 inches. If the fire box is very small, you might need to use a more narrow shelf and lift it further above the top of the fire box. Test sizes by cutting a piece of cardboard and positioning it where you think the shelf will fit.
Remove the nailer board. This is usually tucked into the back of the shelf in packaging. This nailer board attaches to the fireplace wall using wall anchors or screwing directly into studs.
Locate the studs in the wall using a stud finder. Mark these locations with a small pencil mark. Position the nailer board on the wall using a level. Screw the nailer board directly into the studs. If you have a masonry wall, use masonry wall anchors, masonry nails or screws and liquid nails to attach the nailer board.
Apply wood glue to the top edge of the nailer board. Slide the fireplace mantelshelf over the nailer board. Drill pilot holes through the shelf and into the nailer board at a 45-degree angle. Screw the shelf to the nailer board or use finish nails. Fill any nail or screw hole with wood fill.