Usually, a mild
electric shock that does not harm you will also not harm your baby. If youy still feel your baby kicking like normal you probably have nothing to worry about. If your baby is not moving normally, you should call your doctor and get it checked out, probably with some non
stress testing. In cases of very severe shock, the baby can of course be harmed, but typically in these cases you would be harmed as well. What you describe does not sound that serious. Pain in your back is very common at your stage of
pregnancy, and might just be a sign that the baby is dropping lower in your pelvis and putting pressure on your lower back, however if this is very severe, you might need to get that checked by your doctor as well. As far as the headache is concerned, if it is mild, resolves with some rest,
Tylenol, and fluids, I wouldn't worry too much about it, but if it does not resolve or is extremely severe, you should see your doctor as well.