My wife has been diagnosed with tendonitis in her shoulder. What can help her arm heal. Is it wise to try and exercise the arm while it hurts?

Ultrasound. Ultrasound can help. If she does no heavy lifting, injection of the tendon sheath with corticosteroids may cure.
Therapy. Therapy, not 'exercise' would be better. I'm assuming this is biceps (bicipital) tendonitis or rotator cuff tendinitis. In either case, home exercises can make the condition worse if not done with proper form. I'd recommend relative rest (stop activities that flare her up) and physical therapy.
Injection. Shoulder tendonitis dramatically responds to single local anesthetic/corticosteroid injection. Caveat: injection must be placed directly into offending tendon & is function of doc's anatomy understanding & motor skills. Osteopaths and physiatrists with a few gray hairs are usually experts. Should have immediate, but transient, relief from anesthetic. Steroid has delayed response of 1-2 weeks.