If you do some hunting around there is other reports of same deal. Had used my MBP for months and was helping friend with her MBP which was giving her shocks. So i said use mine as it is Ok - she got a shock off mine. So with playing around i could get a shock off mine if i took my shoes and socks off and put bare foot on flagstone, but her machine was a bit worse. Quick fix - put a rubber mat under your feet. As far as i could find it was a design issue and more of a concern to sensitive persons - guess that made me insensitive.
I've had this issue with the magic mouse & the magic trackpad as well, which both work on batteries. My wife doesn't have any problem. So I guess it's a question of personal sensitivity to small electric currents: both the magic mouse and the magic trackpad work because a little amount of electric current goes through your fingers.
To solve the problem, I've put two layers of plastic protections on my trackpad (those that are normally used to protect ipod screens), and I also desactivated the option "touch to click". So far, it works well for me.
If you only have shocks coming from your trackpad, you might try this solution. If it happens with other parts of your computer, then it's another problem: you should ground it.
Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.