When she is zeroed in on something and barking, you have to break her focus. The key is to remain calm. If you become worked up and anxious, she will sense your uneasiness, and this will only reinforce the bad behavior. Be firm, but calm. Break her focus by snapping your fingers, a sharp, brief whistle, clapping hands, etc. Whatever is effective at breaking her focus. Make her look at you, and tell her "no," in a low, firm disapproving voice. When she obeys, give her lots of praise in a higher, happier voice, pet her, and give her a treat. When she walks by another dog or person without barking, again, reward her with praise, petting, and treats. This is something that is going to take time, so don't give up if you don't see immediate results. Successful training doesn't happen overnight, so don't get discouraged.