Shaking hands isn't merely a good social skill. Dogs who learn to shake hands get used to having their feet touched. They get a lot of compliments for their good manners. And they enjoy it so much, you may have trouble getting them to stop.
While you dog is sitting, reach your hand toward him, palm-up, at the usual shaking level. Most dogs will instinctively reach forward, although some won't get the idea unless you pick up the paw and give it a shake. In either case, say "shake" once you're holding the paw. Then praise him a lot. Once he understands that "shake" get him praise and maybe food, he'll reach out to shake hands at every opportunity.