I did not record the extrusion with shape keys. I animated the extrusion with shape keys. That’s basically what you’re missing. A timeline.
Set your screen up with a Buttons window set to Edit panels, a 3D window set to camera, and an Action Editor window.
Add a cube. Select the top face. Extrude it but don’t move it. Escape to end the extrude. You now have double vertices on the top face. While the new vertices are still selected, make them into a vertex group called, say, top face.
Switch to Object mode. In the Shapes panel, Add new shape. You should get a shape called “basis” and a “slider” title shows up in the Action Editor. Click on the arrowhead, the slider column will open, but it’s empty at this point.
Select Add shape key again. This time you’ll get some more controls. Name the key and fill in the Vertex group with the name of the vertex group created earlier. There’s a couple of ways to set the initial key, but the simplest is to click on the slider’s number 0.00 in the Action Editor, and reenter the number 0. A key should show up in the Action editor.
Now we do some animation. Move the timeline out to, say, frame 30. (drag the green line out to 30, or set the Animation Frame counter in the Button window header.)
In the 3D window, switch to edit mode, use the vertex group “select” function to select the top face (this will be more useful as the shapes get more numerous or more complicated), and move it up along the z axis. Click on the Top Face slider number again, but this time type in 1. A new key should appear under the green timeline at frame 30. Set the 3D window back to object mode. The object should retain it’s new shape.
Now you can drag the green timeline between frame 1 and frame 30, and the object will change from the 0.00 shape (a cube) and the 1.00 shape, a tall rectangular prism.
With the cursor in the 3D window, Alt a will animate the object. (Escape ends the animation)
More: drag the timeline out to frame 60, and slide the slider back to 0. Now the face will grow and shrink again. To make it loop, go into the render panels (F10) and set the end value in the anim panel to 60.
More: you can repeat this process with a different face, or you can set up many extruded faces and vertex groups all at the same time, and then just add new shape keys, but either way: SET THE SHAPE KEY BACK TO BASIS before you add another new shape key. Given your goals, you may want to experiment with starting a new shape key based on something other than the basis key. If you do, and you figure out how to control it, write it up and post it either here or in tutorials. (That’s your fee for getting all this good advice.)