We demonstrate the fabrication and response of a smart material combined with spiropyran molecules. Spiropyrans belong to a class of compound that constitute molecular switch. They change color in response to different stimuli such as heat, UV light or mechanical stress. These molecules have been incorporated in polythiourethane (PTU) which is a shape memory polymer. The observations revealed that the molecular switches do not alter the physical properties of the PTU in general; however, both, the spiropyran molecules and smart polymer show changes individually when exposed to heat. The microscopic mechanisms of switching process in response to external stimuli have been discussed in detail.