Here's a cheap idea I found:
http://www.shareable.net/blog/ikeas-cheapest-bookshelvesHere's a cheap idea I found
. Basically, it involves getting shelf brackets (which can come as cheap as $2 for a pair) and a set of bed slats (the cheap pine ones, not the engineered springy kind!) from IKEA. Screw the shelf brackets to the wall, put a pair of bed slats on each, and pile on the books.