We address the thermal control of the quasi-static evolution of a polycrystalline shape memory alloy specimen. The thermomechanical evolution of the body is described by means of an extension of the phenomenological SOUZA-AURICCHIO model [6, 7, 8, 57] accounting also for permanent inelastic effects [9, 11, 2]. By assuming to be able to control the temperature of the body in time we determine the corresponding quasi-static evolution in the energetic sense. In a similar way as in [28], using results by RINDLER [49, 50] we prove the existence of optimal controls for a suitably large class of cost functionals.