The Root of the Behavior
A dog will raise his paw for several reasons that have nothing to do with shaking, so it is important to learn the difference. A hunting dog will often be in pointer position, ears back and will lift his paw in anticipation and excitement of seeing his prey. He is not doing this to say hello. If his tail is tucked and head is low with a paw lift, he is anxious and not looking for you to take his paw and shake it. Head and eyes up, tail out and paw up tells you that he is interested in something and is anticipating something good. Typically he sees or smells something such as a toy, a food item or perhaps his leash. Shaking this paw is not a bad idea, but also not what he has in mind.
Encouraging the Behavior
Other Solutions and Considerations
Dogs do use pawing to gain attention, and at times it can get out of control. An unwanted paw when your hands are full, or scratches from an aggressive pawing can be a problem. If your dog is offering his paw a little more than you would like, you need to train him to only use his paw when given the command. A more dominant or aggressive dog may try to use his pawing to establish dominance and this cannot be tolerated, as you need to remain his alpha. In the event that your dog is using his paw in an attempt to manipulate or control the situation, hiring a trainer to set your pup straight is a great idea.