Scaling a set of objects
If I got it right, what you could do is using hook to move one side of the shelf, like this


In edit mode, select all vertices of one side of the shelf, then, hook (CTRL+H) them to an empty like this





then you can select the empty





and moving it (here on Y) will "scale horizontally" your shelf like this:






Other setups are possible, this is just to give you the idea