One year old screaming shaking

My one year old is really constipated. Her poop is a play doe consistency. She’s on lactaid whole milk. This morning she keeps screaming and shaking when she’s trying to poop which she can’t. What can I give her?

I called the pediatrician and the triage nurse was no help. She said just load up on fruits and vegetables but the thing is she’s in a lot of pain and won’t eat. Any experienced moms can help me?! 😪