My current dog is a rescue with a long history of abuse/neglect. He was supposed to be in supportive foster with me but never left opps.
He needed firm boundaries, stability, a lot of time, gentle encouragement, quiet and his own space whilst slowly showing him that not all people are hideous.
Baby steps were definitely the key with him. He spent a lot of the early days hiding when I wasn't having to feed him - his stomach was absolutely shot so he needed a huge amount of supportive care. It was just a case of doing what I had to (feeding, changing his bandages) then just letting him know I was there. I spent a lot of time reading whatever I was reading aloud so he got used to my voice.
His bed was in the corner of the dining room with the adjoining doors to the living room open. He loved his space and didn't really want to come into mine.
Noise really bothered him so very slowly I started making more of it, he now doesn't care when I drop my hairbrush onto laminated flooring or one of the internal doors slams. He just gives me the "mother your an idiot" look.
3.5 years later he still loves his bed but is much happier with human company than without it. He still occasionally turns into scared dog but very rare. He now openly asks for people's affection.
Think time, patience, boundaries and rountine with any dog is key but more so with a rescue.