If you get injured, it's a combination of luck, morphology, and activity, ie the interaction of your genes with the environment, just like anything else. You can follow an excellent routine with exemplary form and still pick up injuries, although good technique should reduce this. However good technique and appropriate routines are hotly debated.
So here's the truth: what works for you will work for you. And that's it. There's no magic formula that works for everyone. Consequently you have to experiment, and consequently you risk injury. That's the story.
Trainers are (probably) not medically qualified, or qualified in rehabilitation. ("Qualified" is a technical term, it does not mean "enthusiastic about"). Consequently they (probably) do not know why your shoulder/whatever got injured, and what to do about it. "Imbalances" and "core" and "posture" are (probably) nothing to do with it. Do not follow their advice. Do not follow the advice of the guy who's had the same injury as you. Do not follow your friend's advice. Go see a professional. And shop around to find the right one for you.
Here the secret secret to recovery from nearly all injuries: Stop doing what caused it, and what makes it worse. Quit that stuff for 3 months. Replace it with something else if you need to (analyse your goals; think long-term not short term). Stay motivated and realise that your body is hugely resilient and adaptable. When you go back to the aggravating activity start from square one, real beginner-level basics, and sloooooooowly phase up the frequency and intensity. Modify, adapt, find your own path.
Good luck :)