Measure the length and width you need your particular bookshelf to be by running your tape measure across the wall. Write down these measurements.
Mark these measurements on a piece of plywood. Cut the plywood to these dimensions using an electric saw.
Run a stud finder along the wall where you want your bookshelf to go and mark the spots where the studs are with a piece of chalk.
Hold the cut plywood up to the wall and against those chalk markings. Make a corresponding marking in chalk on your plywood shelf, so that when you attach the L-brackets to the plywood they will hit the wall exactly where the studs are.
Drill the short side of two L-brackets to either end of the bottom of the plywood shelf, to a corresponding chalk mark with a handheld drill and two of your short screws. Use the appropriately sized drill bit.
Change your drill bit to one which matches 6-gauge screws. Drill the long side of each L-bracket to the wall, ensuring each bracket hits the wall at place where a stud is. Use your 1.5 inch screws.