How can you help a child that wont poop because she said it hurts?

Child retains stool. Assuming hirshprung's has been ruled out, her behavior may be a "control" thing. But, the longer she holds it in, the drier & harder it gets, & it hurts to pass. Have you tried using miralax/colace daily to improve laxation, a scheduled stooling program at which time each day she is expected to sit on the cammode, & have you rewarded spontaneous bowel movements on her part & disuaded her holding?
Hydrate. One of the main jobs of the colon, or large intestine, is to recover water from the things we eat and drink and our body adds(saliva, stomach acid, bile& digestive enzymes) as we swallow and digest food. If your child's stool is hard; it hurts .More water and some prune juice never hurt. There are some diseases that interfere with normal bm's and a talk with your dr may help.