You are confused. When the star expands to become a red giant it is burning hydrogen in a shell around an inert He core.
How things proceed from there depend on the mass of the star, but generally speaking, the core contracts and heats up to maintain pressure and hydrostatic equilibrium. The shell moves inwards, heats up and the nuclear burning rate increases - the star become more luminous.
At the same time, the envelope expands - the star has a bigger luminosity, but a much bigger radius and so a cooler effective temperature - a red giant.
During all this phase, the He core gets hotter, because (i) it shrinks and the Virial theorem demands that a fraction of the gravitational potential energy is turned into kinetic energy; (ii) it is being heated by a nuclear burning shell all around it!
Sooner or later, the core becomes partly or fully degenerate which makes its pressure almost independent of temperature, so it could cool at constant radius, but it continues to contract as more ash falls onto it.
At some point it gets hot enough to ignite He. This can occurs rapidly; initially the core does not expand if the (degeneracy) pressure is independent of temperature, but eventually it becomes hot enough to lift the degeneracy, the pressure rises, the core expands and the temperature falls, before stable He burning in the core is established.
The extent to which this happens depends on the mass of the star. In low mas stars (say less than about 2 solar masses), the core can become highly degenerate before ignition, and this results in a runaway process called the "He flash", which causes a drastic core expansion and cooling. In higher mass stars the He ignition proceeds towards a stable equilibrium in a much smoother way.
I found this plot from a thesis by Gautschy (2012), which shows the evolution of the star in the central density vs temperature plane. The He flash takes place in the core of the low (1.3$M_{\odot}$) star at point A. The core expands, drops in temperature and density, before recovering and rising to point C which marks stable He core burning. At the same time the luminosity of the star falls because the H-burning shell is pushed outward and extinguished. The higher mass star does not have a highly degenerate core and expands more smoothly and slowly as He ignition takes place. Its core temperature gradually rises at almost constant density before expanding and cooling a little before settling onto the He core-burning horizontal branch.
