Or just using a bracket that would allow you to move the shelf away from the wall slightly.
Hanging shelves on an uneven wall.
Place the shelf frame with the bottom but no top where you want it on the wall and screw it into every stud that it touches.
Adjust the level until the bubble is centered and mark the keyhole locations on the wall.
Attach the plywood top to the frame.
If you want the line to stay invisible place the top of the shelf on the line.
Hold the level against the wall at the height you want the shelf.
Then install anchors or drive the screws into the studs and hang the shelf.
Hang the shelf on the mounting brackets.
Fit a floating shelf by pushing it onto the bracket instead.
Step 4 cut along the pencil line using a table saw.
Use liquid nails to attach the front and optional sides.
Then check the shelf to make sure it s sturdy and ready to bear the weight of whatever you put on top of it.
For example using an ordinary standard and bracket shelving system would push the shelf itself off the wall by about 1 2.
Pick up the shelf with the fasteners attached and line it up on the wall.
Remember that the top of the shelf will be above your marks.
Buy a different type of shelf that s less dependent on wall being flat.
As the shaft of the pencil passes over an uneven place in the wall it causes the line drawn on the board to skip outlining the uneven parts of the wall.
You can use the nail gun to hold them in place while they dry.
You can have someone hold the shelf for you while you use a level to double check the evenness if desired.
Use the drawn line to help you ensure the shelf stays even.