There are several solutions to this problem, I prefer to deal with it by using patience, praise and lots of time.
Does she tie? If she is used to be tied then tie her short to a solid wall, stand to the side, not in front. Start sctaching her neck, shoulder, gently run your hand down her front leg. Stop. Do not pick it up at this point. You should be facing backwards toward her rear. If she doesn't rear, praise and pet, ans scratch somemore. Keep repeating, on both sides. Let her rest and be a horse, try this a couple times a day. Once she has this part down, start to slowly rub her front legs, front and back. Stop. When she has this learned then repeat but lift the foot, hold for just a couple seconds put it down, if she stands quietly then praise, once this is learn you should be able to clean the hooves. If you have a rasp you can run it over her hooves between farrier visits to get her used to that as well. If she rears while leading, snap the lead line, always stand to the side of her. If it gets really bad you could put a chain over her nose, but it could do some damage so maybe if she is that bad, you might want to seek the help of a trainer. If she is doing this only for the farrier it is probably lack of learning, training, so I would try to be gentle and patient with her. If she doesn't tie the have someone hold her in a corner pushing her side into a wall, and her head facing another wall, stand on the side that is open, not in front and keep her against the wall so she can be trimmed, reverse for the ohter side.