Locate the studs in the desired area of wall with a stud finder. Mark the location of the studs, being careful to mark both sides of the studs which are more common in the corner of the room. Measure the distance between the center of one stud and the center of another.
Arrange the brackets on the underside of the shelf board, using the same spacing that you noted for the wall studs. Place the regular brackets on the sides of the shelf and the corner bracket in the corner. Mark the location of the bracket holes on the shelf board.
Pre-drill the bracket holes in the shelf, being careful not to puncture the top surface of the shelf wood. Attach the brackets to the shelf with wood screws.
Position the shelf against the wall and place a carpenter's level on top of it. Balance the shelf until it is level in both directions and matches the lines of the room. Mark the location of the bracket holes in the wall, ensuring that they line up with the markings for the studs.
Pre-drill the bracket holes in the wall, using a slightly smaller drill bit than the diameter of the wood screws. Attach the brackets to the wall with wood screws, tightening each one halfway until all are completed then returning to tighten them all completely.