Actually both are going on at the same time. The shock wave starts the exothermic reaction, which then supports the shock wave as it travels
All from Wiki
"Detonation wave
Main article: Detonation
A detonation wave is essentially a shock supported by a trailing exothermic reaction. It involves a wave traveling through a highly combustible or chemically unstable medium, such as an oxygen-methane mixture or a high explosive. The chemical reaction of the medium occurs following the shock wave, and the chemical energy of the reaction drives the wave forward.
A detonation wave follows slightly different rules from an ordinary shock since it is driven by the chemical reaction occurring behind the shock wave front. In the simplest theory for detonations, an unsupported, self-propagating detonation wave proceeds at the Chapman-Jouguet velocity. A detonation will also cause a shock of type 1, above to propagate into the surrounding air due to the overpressure induced by the explosion.
When a shockwave is created by high explosives such as TNT (which has a detonation velocity of 6,900 m/s), it will always travel at high, supersonic velocity from its point of origin"
"An exothermic reaction is a chemical or physical reaction that is done by the release of heat. It gives out energy to its surroundings. The energy needed for the reaction to occur is less than the total energy released."
"burning is the sequence of exothermic chemical reactions between a fuel and an oxidant accompanied by the production of heat and conversion of chemical species."