So, out on walks you can use counter conditioning to change the way she feels about the scary things. It is slow, but with consistency you can help her change her mindset. Basically pair super tasty treats with seeing the scary things. You need to start somewhere where she is not flooded - and then see scary thing - feed treats - scary thing goes/passes treats stop. If she's already barking before you treat, then she is already over aroused and can't focus. You need to find somewhere else to practice, where you can get the food in before her reaction.
You can also train some pattern games, e.g. 1,2,3 treat, that you can use on walks to get her to focus on you. Also train a solid 'this way/let's go', so when you are out and she is about to kick off, you can say 'this way' and she literally does an about turn to follow you in a different direction (and get tasty food) as opposed to reacting.
I would really get a trainer in to help you with this. Or join Reactive Dogs UK for online support and guidance from professionals as a starting point.
For being out in pubs/cafes, you can start by teaching her to settle on a mat/rug at home - that's easily portable to take out with you. Once she learns that the mat means she has to settle, move it to practising in a pub/cafe and also to help her - give her a licky mat or stuffed kong to give her something to do. There is a lot of guidance online to show you how to train this.
Also worth noting some dogs just dont enjoy being in pub/cafe environments and would be happier left at home.
There's no quick fix. It will take time, consistency and patience. I work with dogs like this every day, and if you get the training right and put in the time, you can help her feel happier and calmer in the world.