Maybe it was a touch lamp? (Like a clapper but works when you touch the body not through sound)

Not unless touch lamps are supposed to give you an electric shock :)

Some of the older/cheaper touch lights did/do give a slight shock! It was a different time lol