The original use for Gabapentin was as an anti-epileptic.
Now it is good for neuropathic pain as well.
We have two sorts of pain sensors in our bodies - slow/deep and shallow/fast. Think about touching a hot stove and you take your hand away really fast, a deep cut will "throb" almost continually (Until dealt with). What Gabapentin does is to prevent the random firing of the synapses that act as relay stations in our nerves.
So, the "electric shock" type of neuro pain is one or more synapses in the shallow/fast category firing at random. The pain where the whole leg (for example) feels like it's being crushed is down to the slow/deep synapses running wild.
It's use against muscle spasms is interesting - Baclofen would be the standard medication for this. Of course, if the spasms are a synapse firing in the opposite direction, the Gabapentin might work, but I have not heard of this case., although is is starting to be considered for migraine relief.