Plywood is always a good choice for books. It's light, affordable and strong. Use hardwood plywood to denote good taste. It finishes nicely and looks good. You can often find strips of plywood already cut to size at home improvement stores or lumberyards. Eight-inch-wide plywood is not commonly used on cabinets.You may be able to obtain it at a cabinet shop as scrap wood for free or at minimal cost. Another alternative that works well is laminated MDF. This product has a slick plastic coating on both sides that doesn't need finishing. It's used for shelving all the time by cabinetmakers, and they usually have remnants they're happy to get rid of. If the material is wider, employees at the shop can also rip it to 8 inches for little or no cost. They're usually happy to help out.
You only need a few other items to build your shelf. Corbels are small braces that fit under the shelf. Corbels are small triangular shaped pieces of wood. One side fits flat against the wall and one side holds up the shelf. The front is angled. Make corbels for this size of shelf from an 8-inch square piece of plywood. Clamp the plywood to a sawhorse, and cut it diagonally from corner to corner to produce two corbels. Use a 3/16-inch drill bit and drill/driver to drill a pilot hole one inch up from one edge. You'll need one corbel for each 32 inches of shelf or one corbel for every second stud that passes behind the shelf.
Sand the shelf and corbels smooth with 100-grit sandpaper. Round the corners thoroughly until they're smooth and comfortable to the touch. The edge will also have a raw plywood appearance. After you've sanded the edges smooth, paint them with a heavy coat of colored lacquer. Choose dark brown or even black, and you'll never notice the plywood edges. You don't need to paint the back edges of the corbels or the shelf. When the paint is dry, spray the shelf and corbels with two coats of clear, aerosol lacquer, sanding after the first coat dries with 180-grit sandpaper.
Hold the shelf up on the wall in the desired location. Mark the ends on the wall with tape. Remove the shelf from the wall. Run a stud finder along the wall and locate the studs that pass behind the shelf. Mark every other stud, there should be one every 16 inches so your marks will be 32 inches apart. If possible, slide the shelf to the left or right so that the studs are evenly spaced along the length. Hold the shelf up to the wall, and transfer the stud marks to the bottom of the shelf. Stand the shelf on it's edge on a table. Place the corbel supports on their edges centered on the marks. One edge of the corbel should be flush on the bottom of the shelf with the other side flat on the table. The angled side should be facing out. Shoot four pin nails down through the top of the shelf into the top edge of the corbels. Drill holes through the top edge of the shelf, 1 inch from the edge, penetrating out the edge at a 15-degree angle at each stud mark or where each corbel is attached. This is a toe-nail pilot hole that will connect the shelf to the wall at each stud.
Hold the shelf up to the wall in your desired location on the stud marks. Place a level on the front of the shelf. Level the shelf while an assistant helps you to hold it. Place 3-inch screws in all the drilled holes. Use a drill/driver to drive all the screws in tight to secure the bookshelf to the wall.