I wouldn't even bother.
If your hamster is scared and timid, why would you put the stress on him of forcing him to meet with something he is terrified of? Plus, even the friendliest dog can get carried away and try to kill the little hamster. If the hamster is scared enough, it can even die of stress alone. Also, if a hamster feels threatened, it can take a hearty chunk out of a dog's nose, which would it certainly provoke the dog to bite.