During their time together at Old Trafford, Mourinho was highly critical of Shaw and regularly ripped into him in public.
"It was sort of a mixed relationship, really," Shaw said as part of the 'What It Takes' feature.
"A lot of the things that happened between us two, I don't think sometimes he went about it in the right way. I think a lot of people will agree with that at the club.
"Our relationship wasn't the best. It was probably quite easy to see that from the outside. But one thing Jose did do was make me mentally much stronger. I think mental strength is what I would describe that period under Jose Mourinho.
"I think I felt part of the team under Ole, whereas under Jose sometimes I didn't. Ole showed his belief and confidence in me. I always believed good times were coming.
"I stuck in and dug deep, went through a lot but come out better on the other side."
Shaw has made remarkable strides forward under Solskjaer and has found himself back in the England squad, starting the 0-0 draw with Scotland at Euro 2020 on Friday night.
Jose Mourinho greeting Luke Shaw & Pogba :eyes: pic.twitter.com/1YxvHEfhYv- Football Daily (@footballdaily) April 11, 2021
Asked about Shaw's recent comments, Mourinho brought up Shaw's horrific leg break against PSV in 2015 and explained his attempts to improve the former Southampton man's mentality did not quite work out.
"I found a boy," the new Roma boss said on talkSPORT.
"I found a boy after an incredible injury that put his career at risk. A boy with some fears and scars from that awful night.
"Then to work with me in a club where I was trying to improve mentalities and make ambitions and responsibilities to grow up. It was not easy for him.
"I push players to the limit and sometimes players aren't ready to follow me in that mentality. We had good periods, he's a player with lots of talent. I think that's one of the reasons why he's playing."
Chosen for YouChosen for You
Most Read StoriesMost Read