How do you explain the statement - "as heat flows from the core of a star outwards, said core heats up and the shell cools down"? Excuse my poor English, I speak French.

Core Collapse in a Self-Gravitating System:

*

*Suppose there was no energy generation in the core. The pressure
would still be high and the core would be hotter than the envelope.

*Energy would escape (via radiation, convection etc.) and so, the core
would shrink a bit under gravity

*That would make it even hotter and then, even more energy would
escape; the cycle continues in a feedback loop

Why? Why the process would make it hotter than before? The core will collapse unless an energy source is present to compensate for the escaping energy.
Imagine a particle that had moved inward. Since it was swimming in the direction of the current of gravity, the particle picked up speed as it fell and therefore gained kinetic energy. Suddenly, it collides with a more energetic particle coming from the center that deflects its trajectory. It now moves outwards. It ends up hitting a less energetic particle coming from the exterior, which causes it to return to the center. It thus lost energy. Why will it warm the core more than before by going back?
 A: The process comes about as a consequence of the Virial Theorem. In its simplest form, the theorem says that the kinetic energy ($K$) of a gravitationally bound system in equilibrium is equal to half the magnitude of the gravitational potential energy ($\Omega$, which is negative) of the system.
$$ 2K + \Omega = 0$$
Meanwhile, the total energy of a system will clearly be the sum of the kinetic energy and gravitational potential energy.
$$ E = K + \Omega = \frac{\Omega}{2} ,$$
which will also be negative if the star is bound.
If the energy is lost, such that $\Delta E$ is negative, then for a new equilibrium $\Delta \Omega$ must be negative too. i.e. The star becomes more bound by becoming more compact.
But from the Virial theorem, we can see that if $\Omega$ becomes more negative then $K$ must increase. i.e. The average kinetic energy of the particles increases and in a perfect gas, that means the temperature must increase too.
As to why the Virial theorem is true - the general proof is quite lengthy and given here. For the specific case of a gas cloud in hydrostatic equilibrium we can say that the pressure gradient balances gravitational forces as
$$ \frac{dP}{dr} = = -\frac{Gm(r)\rho}{r^2}\ , $$
where $\rho$ is the density and $m(r)$ is the mass inside radius $r$.
The total gravitational potential energy for a cloud of radius $R$ is given by the following integral
$$\Omega = - \int^{R}_0 \frac{G m(r) \rho}{r} 4\pi r^2\ dr\ ,$$
and using the equation of hydrostatic equilibrium, this is
$$\Omega = \int^{R}_0 \frac{dP}{dr}4\pi r^3\ dr$$
Integrating by parts and setting $4\pi r^2\ dr$ to be a volume element $dV$, we have
$$3\int P\ dV + \Omega = 0\ .$$
This is indeed a statement of the Virial theorem because the kinetic energy of an ideal gas is given by
$$ K = \frac{2}{3}\int P\ dV\ . $$
A: If something makes the fusion core of a star suddenly get hotter, the core expands, becomes less dense, and the rate of fusion decreases. this makes the core cool off. Conversely, if the core suddenly cools down, it contracts, gets denser, and the fusion rate goes up, making the core get hotter. This is a powerful negative feedback system which makes the star self-regulating and stable against perturbations.
Note that heat transfer in the core of a star is not by radiation, because the core is opaque to radiation. It is by conduction and convection, which are much, much slower processes. This means on short timescales, excess fusion heat is trapped in the core and cannot get out easily, and thus causes the core to expand and become less dense- which turns down the fusion rate and shortly makes the core cool down a bit.
Now let's take the case of a gravitating cloud, before fusion is ignited. we model the system as a point mass with lumps of matter in orbit around it. If we attach rocket motors to those lumps to speed them up a bit, they shift out to orbits of greater diameter and while doing so, they slow down since it takes less speed to maintain orbit farther out from the gravitating central mass. So, by adding energy to the system, it cools down (that is, it moves more slowly).
Systems like this which cool down when you add energy and heat up when you remove energy are called anti-thermodynamic.
