It's going to take a lot of dedication and timing on your part to retrain her. You and your friend will need to agree to ride the same way during it and not run barrels for a while. You need to go back to the bare bones basics and ride her like she's just a youngster getting her first rides because that's where she's at in her training. Second, even barrel horses shouldn't be ran on barrels all that often. At home it should mostly be slow work with your running done mainly at shows.
You need to go back to the ground and teach her to give to pressure before you ride again. It will give you solid basics so that you can ride safely.
Put her in a rope halter and teach her to flex. Stand at one side of her, slide your hand down the lead rope until you just barely take the slack out of the lead then wait. If she slips her head, keep the same pressure on her but go with her, if she spins in circles, keep the pressure and walk with her, if she backs etc. Keep that light pressure on until she turns her nose toward you to put slack in the lead and stands still. When that happens, let her straighten her head and give her a little rub before you ask again. You aren't asking for her to turn her head a lot at this point, just a little. Keep repeating on that side until she'll give her head three times in a row without moving and without first pulling on you. Then go to the other side and teach it to that side. After it's initially taught, go back to the first side and check that it's good.
When you're asking her to flex you want to just hold light pressure. Don't pull, if you pull then you'll end up pulling after she has tried, be very aware of this as she'll learn slower if you don't ask properly. Next, it's light pressure. Grab a couple of her mane hairs and pull lightly. If you pulled hairs out you're pulling too hard. You don't want to pull hard because she already knows how to brace against that, the less pressure you apply the less the horse will see the need to fight it.
Then you want to teach her to disengage her hindquarters. For simplicity's sake in explaining start at her left side. Stand a bit father back down her side and with your left hand, have most of the slack taken out of the lead. Your right should hold the remainder of your leadrope, lean in slightly toward her hip and twirl the leadrope for a couple spins, then barely tap her hip the lext couple of spins, every couple of spins tap harder until she moves her hip away from you. If she tries to go forward shorten up the lead in your left hand a touch so she'd bent around you so her hip moves. After she understands to move in the first place get pickier. You want that left hind foot to step underneath herself and over her right hind foot when she moves away. Until she steps over like this don't release the pressure. Repeat this until she moves off of just the leadrope spinning before it touches her again three times or so. Repeat on the other side.
This should be able to be taught in a single session. I'd also teach her to lunge, but not for exercise. I lunge to get my horses attention by switching direction and speed often. On a horse that lunges very nicely doing the basics i'll also hold my lunge line differently to encourage the horse to do a smaller circle while they disengage their hindquarters on a circle.
You also want to desensitize to a dressage whip because you'll be riding with it. You want to make sure you can swing it all around her, that she's fine with it touching her and also to sensitize her to it. You want to be able to use it undersaddle to move her hip around so repeat the disengaging but using the dressage whip.
Practice getting things really good on the ground for a few days before you ride.
This is also a time to look for any small issues she has. They are all symptoms of a problem, does she stand when you mount? Does she stand tied quietly? Does she lead quietly without being pushy?
Do you have a roundpen to ride in or can you section off part of your arena with some panels or something?
Now you're going to ride in just that rope halter, you'll attach your reins after the knots on the halter where the cheek piece and the part going under the jaw come together by the knot. Go ahead and mount with her head flexed a bit and get your other stirrup. Flex her each direction to make sure that is nice and soft. After flexing a couple times on each side, flex her ( again lets say to the left), slide your left leg back to ask for her hip to move over ( just lightly press with your left calf), if she doesn't move use the dressage whip on her left hip by lightly tapping until she moves over a step. When she moves, quit tapping and take your leg off. Repeat until she'll move off of just you calf AND then stop moving when you remove it. Then you want to just flex her to make sure she doesn't anticipate moving her hindquarters around. When that side is good do the other side.
You want to make sure you have complete control at the standstill before you ask her to walk off, if you're out of control here then you'll for sure be out of control once you walk forward.
You will NOT be pulling back to stop. Forget about that, and forget steering. Simplify things, all you are worried about right now is a walk, and trot on a loose rein, loping when the trot is good and bending to a stop. You aren't pulling back because she knows how to evade that, she needs to go back to the very basics.
Now ask her to walk off. So you aren't tempted to use two reins, hold the saddle horn in your right hand and have your left hand slightly down the reins. Just let her walk around wherever she wants. If she so much as picks up her head and gets tense, take the slack out of that rein, holding your hand slightly outward and bend her to a stop. The same applies if she goes faster, just bend her down. You want her to disengage her hindquarters before she stops, use your leg and whip if you need to. Then have her stand and get relaxed again before you walk off again. You don't want to pull hard, she already knows how to pull against you and win, be soft.
When you can walk around on a loose rein ask for a jog, and repeat. If she gets tense or speeds up bend her to a stop. After a few stops you'll feel her start to relax as soon as you go to bend her down. When this happens you don't need to bend until she stops, just until she walks. When she walks calmly pick up the jog again.
When she jogs nicely ask for just a midge bigger trot until you've got it built up to a nice working trot. You may not lope for a few days and that's fine. You want each step great before you move on and that means being able to walk and trot on a loose rein before you lope.
That should occupy your time for a couple of weeks, after riding like that for that time you should start to feel a huge difference in this mare. At that point I can give you a few new things to work on.