A weapons enthusiast got drunk and ordered a stun gun which was advertised as being capable of discharging a million volts.
A court heard Border Agency chiefs intercepted the package containing the weapon before it reached the home of Michael Lodge, 31.
When officials went to his home in Normanton, they also found three air rifles which Lodge did not have the required certificates for.
Carmel Pearson, prosecuting, said officials intercepted the parcel containing the weapon at a depot in Leicester.
It was addressed to Lodge’s home and came in a box which read: “Shocking one million volt zap light. TM flashlight stun gun.”
The weapon was sent for testing and found to contain six electrodes which released a “high voltage blue spark.”
Miss Pearson said the weapon was capable of passing through clothing and could cause pain and scarring if it came in contact with the skin. The weapon also contained a torch light.
After his arrest Lodge, of King Street, described himself as an “amateur gunsmith”.
He told officers he had ordered the weapon online when he had been drinking and did not realise how dangerous it was. He claimed he just wanted a torch to attach to his rifles.
Lodge, 31, appeared at Leeds Crown Court on Monday after pleading guilty to purchasing a prohibited weapon and three offences of possessing a firearm without a certificate.
He was given a nine month prison sentence, suspended for 18 months, and ordered to do 200 hours unpaid work.
Judge Penelope Belcher said: “This was a nasty weapon. You knew full well, in my view, what you were buying. You have not been full and frank with the court.”