I bet her pain and problems with pooping are loose stools, which don't empty the anal glands. Then the glands fill up and the scooting and pain return. Although the vet emptied the glands, they fill up again rapidly.
I would recommend replacing the green beans with baby sweet peas. This should firm up her stools and help express the glands naturally and hopefully put an end to her problems. Use frozen, no salt added peas. Microwave in a bit of water and then cool with cold water before serving. Start with half a teaspoon.
Keep up with cleaning her little rear end.
You may also want to consider a different food. Is the Pedigree you are feeding a canned food? I would go with kibble and choose another brand. Need to add: switch slowly!
Hope this helps.