Attach Support Blocks and the Center Shelf
Attach 1" x 2" support blocks for the center shelf with glue and finish nails (Image 1). Drive the nails until each head is just above the surface of the wood, then use a nail set to drive it just below the surface.
Drill and countersink pilot holes for the top of the bookshelf. Attach it with glue and 2" wood screws.
Apply wood glue to the support blocks for the center shelf, and set the shelf in position. Drill and countersink pilot holes in the side of the bookshelf, and attach the shelf with 2" wood screws (Image 2). Be sure to drill the holes in an area that will be covered when the bookshelf is recessed into the wall.