Welcome to HCM.
Since you are pregnant, it is better to avoid x-ray of the shoulder as far as possible, but if necessary it should be taken with abdominal lead shield to protect the child in the womb from radiation
You could try applying local pain balm or pain killer spray or pain relieving ointment and apply hot fomentation on the joint. Avoid oral intake of pain killers, to be on safer side.
If all this remedy does not relieve the pain, there is no other alternative left but to consult an orthopedic surgeon.
Wish you safe delivery of a healthy baby.