Lampshade With Dimmer Causing Electric Shock?
With a very high degree of confidence, that dimmer was not part of the original manufacture.  The way the cable has been split to bring the live wire out looks very much like a post-consumer hack.

Having said that, the box and the dimmer knob both appear to be plastic, so it is hard to see how you could have got a mains shock from the unopened dimmer.  

On the other hand, given it looks very dodgy, I would cut it off and throw it away, and replace it either with a simple on-off switch, or a proper inline dimmer.  I searched for "inline dimmer switch for lamp" and got lots.