If failed therapy. For most shoulder injuries or conditions, surgery is an option, but only after an adequate amount of time has been allowed for the condition to resolve, and conservative treatment with physical therapy, anti-inflammatory medication and activity modification have been tried. However, surgery might be the best option for painful rotator cuff or cartilage tears, instability, or impingement.
Talk to your surgeon. Talk to your orthopaedic surgeon who will give you both the non-operative treatment options and operative treatment options and the risks and benefits of each. If you are uncertain about a surgery, get a second opinion.