That's a very easy trick to teach. My JR will not do it, he know's how, but refuses. Pick up the paw several times and say the command, "shake." Then say, "other paw."
My GSD also rolls over at 6 months and learned that early on.
Elementary Mr. Watson. Just like opening a can of tuna fish, done in 15 seconds...