Teaching a dog to shake hands is a very simple trick. Teaching your dog how to shake hands will only takes a little time and it can be taught anywhere, making it very convenient for you. All you need is time and treats.
The first thing to do is to ask your dog to sit. When the dog or puppy is sitting stand in front of him and lift up his paw and place it in your hand as you say "shake" then give the dog a treat and praise him. Do this for several times in order for the dog to understand what you are trying to communicate to him.
Next step is to say "shake" and see if the dog gives you his paw. If he does not, do not worry, you are still on track, you can prod him by lightly tapping his paw. Reward your pet even if the dog just lifts his paw without giving it to you. This is progress and should not be ignored.
Show the dog again what you want him to do by lifting his paw to your hand and saying "shake" then rewarding the dog.
With time, the dog should learn to present his paw and place it on your hand when told "shake." Reward every time the dog does this, the treats should be coupled with verbal praise. This will motivate the dog more.
When the dog is able to perform this trick well enough, you can start withdrawing the treats. This should be done over a gradual period of time. If the dog shows a relapse e.g. does not respond to the command, you can introduce the treats again and give the dog some time before withdrawing them.
When teaching your dog new tricks, the important point to note is to do it in a place with minimal distraction.
After your dog has learned to shake hands you should practice it in different scenarios and see how the dog responds. You can start with the family by asking the dog to shake the hands of other family members. Next, you can try to this with a friend and lastly a stranger.
As always keep training sessions short and do them a few times during the day over two weeks or so. All dogs are different and like humans some learn quicker that others do.