I was mighty close to doing the same thing until it was explained to me that it would likely kill the perp. There had been a rash of bicycle thefts in our town, including one of my sons’ bikes from our front lawn in broad daylight.
I wanted to wire a bike and wet the ground, to kinda’ get the thief’s attention. But the death penalty for bike theft is a little over the top.
Just use a fence zapper for dogs that you can run a wire to the bike. Use the bike as bait, but make sure it is insulated from the ground with a piece of cardboard or something.
Get an HD camera set up to watch it and record the thief who takes it. Then you can laugh every time you watch the fool get zapped with instant replay!
You might even go to the length of putting an electronic tracker in the bike itself.
Finally, a voice of reason. Too many bloodthirsty heathens on this thread.
Oh..wait..what kind of bike?