Stand with your back to a wall about a foot or so away from it. Lean against the wall and do a modified squat as your body allows, sliding down the wall on-quarter of the way at first. You should feel a burning sensation in the thigh muscle area (this is good) and not burning or pain in the kneecap area (not area). As you get stronger, you should gradually be able to go down farther. (If you feel pain under the kneecap, you are going too far. Sometimes there is a mid-range of discomfort, and you can actually go lower, beyond a comfortable position.)
If you have patellar pain syndrome with kneecap pain, then do a modified Squat or Wall Seat in the partial sitting, partial knee flexion position as your body allows. Also, do not step out as far and flex your knee only partially, that is one-quarter of the way down. If you are unable to do this version, you will need to work on quad isometrics daily until you're able to do it.