The temperature dependences of the refractive index, n(T), calculated from ellipsometric data during the premartensitic and martensite transitions in a Ni2MnGa ferromagnetic shape memory alloy allow to detect all critical temperatures of the sample. The performed measurements reveal the behavior of a surface layer of a few tens nanometers depth due to the light absorption. Optical measurements reveal the earlier onset of premartensitic transition at the sample surface and shows unknown new features like time and temperature dependent effects related to the crystal surface. The underlying mechanisms of the observed temperature changes of the equilibrium n0 may be related to temperature dependent interactions between free electrons and phonons as well as between electrons and defects. A giant isothermal creep (up to 20%) of the refractive index was found for temperatures below T0 = 315 K. Below T0 the creep amplitude grows with the temperature difference T0-T. The creep disappears and the relaxation time becomes zero at temperatures above T0.