This is a phrase that a gentleman may use to indicate that he is about to masturbate (referring, of course, to the penis as being a metaphor for a puppeteer's hand, with the female being the puppet).
Now with your kind permission, madam, I would like to retreat into the back room and engage in shaking hands with the puppet master. I shan't be long.

Jenkins was feeling very horny yesterday, as he hadn't participated in shaking hands with the puppet master since the weekend.
by Karfungulator October 8, 2007
Get the Shaking Hands With The Puppet Master mug.