Bookshelf is intended to provide entertainment for your Prisoners. Once placed, it will cater a little bit to the prisoner's Literacy need, but only if prisoner stays in its area-of-effect .
Area of effect radius is 2 tiles, so placing one in the cell or dormitory might be very beneficial not only because it increases room grading by one point but also keeps the literacy need low.
For libraries, there is a larger counterpart, the Library Shelf.
Bookshelf and it's area of effect.