When in pain, some dogs have a very rigid and hunched stance while others assume the "prayer" posture with their front legs on the ground and their bottom in the air.
dogs often take the "prayer" position when they are suffering from abdominal pain as it allows them to stretch this area out.