When my dad was a boy, he and his brother rigged up a Model T coil to an old man's car door handle, while the man was in a local store. When the senior citizen came out and touched the handle, he passed out cold. My dad and uncle figured they had killed the old coot, and ran five miles home, where they hid under the bed. My grandfather walked them back to town to face the music, where they had to apologize to the now recovered, and mad as heck, victim. They never tried that stunt again.
You never know the results of a shock. What if the person that received it had a pacemaker? Electric shock alarms would certainly be discouraging, but in this litigous age, would likely do more harm to you than to the thief.