When I taught my dog to "shake" (in spanish " la pata"), I first made them learn how to sit. Once they've learned that, with a treat in my hand I'd say "shake" and grab his paw, and the give him the treat...I'd do this several time until they've get it. Once they've learned that, I'd teach them to shake with the other hand...I'd say "shake" and they'd give me one paw, then I'd say "the other hand" and they'll put the paw I have in my hand down and give me the other paw. Most of the time they'll do it right unless they are too excited to get the treat.