Shear animation effect?

Trying to make a shelf that morphs into a short stairway, but I have no idea how to make an animated shear/skew effect. I am using Blender as my modeling program; any suggestions on how to do this?

Any ideas would be appreciated.