Hey, I'm not any kind of coach or PT, but foward lean in the squat seems like an effort to shift the load to the middle back. It's like the body trying to turn the squat into a good morning. To paraphrase Dan John, rather than a deep knee bend, the body is going into a hinge.
In order to squat the glutes and abs/hip flexors have to work equally to "balance" or stabilize the pelvis. When the pelvis is stable, the legs can externally rotate. To the observer this kinda looks like the knees pushing out to the sides. But if you are doing it right, it should feel different. The glutes contract to drive the pelvis forward and "turn" the thighs and knees "out." Then you squat in between the legs, instead of bending over on top of the legs. When you do it right, it feels really natural, and you don't need to think about it. You rotate you knees out, drive your hips forward and your head back and power up. It's second nature, and you even get off the couch this way.
But when something is weak, your body finds a different way to move around. For example, instead of rotating out, weak glutes allow the knees to shift way forward, which results in big forward lean and knee and back problems. Weak abs or hip flexors reinforce the bad movement pattern. Then, every lift just overloads the relatively "strong" muscles while under loading the relatively weak muscles. This makes the movement worse, which just continues the cycle.
This happened to me. After an injury, I "forgot" how a squat was supposed to feel. I stopped "screwing my feet into the ground" and forgot how to really generate tension in my hips. This caused me to start leaning forward, and using more back and less hips. This bad position took emphasis off my abs, so after awhile I "forgot" how to use my hip flexors and abs to stay upright. Which lead to more forward lean, weaker glutes, worse technique, and on and on.
If your friend is a true beginner, she may not know how to really "use" all her muscles to set up for the squat. She may not know exactly how things "should" feel because she has no experience trying to feel or flex her deep abdominal muscles or her abductors.
I know this was the case for me, and I consider myself an experienced lifter. It got so bad, I'd box squat and when I sat on the box my feet would come off the floor! I just couldn't make my body squat right. I've tried all kinds of stuff over the past couple months and lots of it didn't work, but I've been making progress lately with a few easy but "targeted" moves.
As a warmup before the weights and as often as I can stand outside the gym
Glute Bridges x10
Seated Psoas Holds x10
These moves are easy, but really target the muscles I was having trouble with.
After a couple weeks I began to "feel" my glutes and hips again and added Peterson Step Ups and Terminal Knee Extensions. These two moves really taught me how to use my hips, glutes and quads together. They are pretty easy to do, but really zero in the muscles on the front of my hip (where the pockets are in a pair pants). They taught me to "feel" muscles I had forgotten you to flex.
I kind of rambled on for a minute, I hope this makes some kind of sense.