cut & pry off the drywall between the two or three studs.
Screw cleats under the preferred shelf locations, into the exposed studs.
Repair the drywall.
Paint the backside of the drywall that was exposed in the demo and the repaired areas/studs.
Nail the new shelves into the cleats.
Do you mean build against a wall?
It would be very thin. Interior walls are only 3 1/2" thick, 4 1/2" with drywall. What exactly are you trying to do? Bookcases are usually 10 to 12," deep. Also in walls are electrical and other utilities you may have to contend with.
Here are a couple ideas for you Lynda. I especially luv the idea of using the Ikea bookcases made to look like built in's w/trim work & crown moulding. Far easier than building everything from scratch! Good luck :)