I don't know what causes it but those gas bubbles in the shoulder hurt like a @$&@. Glad you're feeling better. Studies show swearing relieves pain. Go for it.
Sounds like she got air in her peritoneum. That would give the pain she was experiencing. I've heard that it is really painful, but have not had it happen to me (knock on wood). Hope she doesn't have that happen again.