M.M.
I'm SO sorry to hear that, that's heartbreaking!
But no, the shot didn't have anything to do with the losing the baby (I've had to have it with both kids.)
The shot helps the mother build antibodies that prevents HER body from attacking the baby's. It doesn't harm the baby. If the mother and baby don't have the same RH factor, then the mother's blood cells will attack the baby's. This typically does not happen in the first pregnancy, because their bloodstreams do not cross. They give the shot *in case* there is any bleeding in utero, and after delivery for any subsequent pregnancies.
Now, it's possible that she may have had bleeding internally, and she lost the baby because she DIDN'T have the shot. (sounds like they were unaware of the incorrect typing). But giving her the shot didn't do anything. IF she lost the baby due to blood type, it would be something that was already set in motion.