Hi, do you get migraines often? I don't personally have any experience with this, but I Googled what you're describing and a lot of people share your symptoms who get migraines. Here is the link to the discussion I found.
www.medhelp.org/posts/Migraines--Headaches/electric-shocks/show/1039098Perhaps you should schedule an appointment with your primary doctor, or if you get migraines fairly often, perhaps see a neurologist.
I hope you feel better soon,
-Cat