Have the lumberyard cut both the 1-inch by 8-inch and the 1-inch by 4-inch boards to the length you prefer for your shelves. Choose a length over 16 inches for easy hanging. Cut both lumber widths to the same length. Pine is cheap, or you can choose better-quality lumber if your budget permits.
Sand the 1-inch by 4-inch boards and the 1-inch by 8-inch boards. Use wood putty to fill any large knots in the wood.
Paint or stain all surfaces of each board. Allow to dry completely. Apply a polyurethane sealer if desired.
Stand the 1-inch by 8-inch board on one long edge. Place a 1-inch by 4-inch board along the remaining long edge, perpendicular to the wider board. Screw together with 1-inch wood screws.
Use a stud finder to find the studs in your wall. Mark the position of your finished shelf on the wall, using a level to be certain that the shelf is positioned correctly. Screw the shelf into place, screwing through the 1-inch by 4-inch board and into the wall studs.