The use of complex fluids is one of the modern techniques used in small devices in order to enhance their thermal performance. This paper is a numerical study of a complex fluid imprisoned in a chamber with two hot bodies exposed to a magnetic field of constant intensity. The upper and lower walls move horizontally at a constant velocity, while the lateral sides are thermally insulated. The numerical simulation of the system was achieved based on the finite volume method that solves the differential equations of fluid mechanics and heat transfer. Simulations were carried out under the following conditions: Re = 1 to 40, Ri = 0 to 100, n = 0.6 to 1.4 and Ha = 0 to 100. The study showed that the thermal activity of the two bodies is different and related to initial condition. Also, the effect of the magnetic field is strong in the case of shear-thinning fluids, while its effect is diminished in the case of shear-thickening fluids.