The shoulder pain you are talking about can be due to multiple causes, so lets try to deal with them as follows:
Is there any neck pain or feeling like that neck pain is radiating to the shoulder or arm? If yes then this is most probably nerve compression in the cervical area. This is investigated using plain x-ray first then an MRI. Treatment is neck exercises along with pain killers and muscle relaxants and physiotherapy.
If there is only shoulder pain and as you are describing with limited abduction and external rotation. Then this could be either frozen shoulder or rotator cuff impingement also called rotator cuff tendinitis. So both of these are extremely difficult to distinguish the thing that does differentiate them it is a lidocaine injection in the area will cause relief in rotator cuff tendinitis whereas in frozen shoulder it will do nothing. Did the doctor do this test? If not he has missed the diagnostic point.
But as I can see this is looking more like frozen shoulder but can be cervical nerve compression as well. Do you have any of the following risk factor female gender, diabetes, age >40 years. So for both X-ray can be done and then an MRI. Treatment is pain killers with muscle relaxants and physiotherapy is the main thing. One of the treatment options include steroid injections to the area but that is temporary relief only as I mentioned all useless without physiotherapy.
You can write both frozen shoulder and rotator cuff tendinitis on google and there's a lot of material available.