What causes the raise of temperature in the outer layer of a red giant when the core gets contracted?
The temperature increase of the core and shell is governed by the virial theorem. As contraction occurs, gravitational potential energy is released. According to the virial theorem, half of this is radiated (or conducted or convected) away and half goes into the internal energy of the contracting material, thus raising its temperature. You can find a simple proof here.

Radiation pressure is unimportant, but continues to increase in any case. Only the surface of the star becomes cooler, not the interior.