A dog is praised and given a treat by its owner for shaking hands.