A linear and weakly nonlinear analysis of convection in a layer of shear-thinning fluids between two horizontal plates heated from below is performed. The objective is to examine the effects of the nonlinear variation of the viscosity with the shear rate on the nature of the bifurcation, the planform selection problem between rolls, squares and hexagons, and the consequences on the heat transfer coefficient. Navier’s slip boundary conditions are used at the top and bottom walls. The shear-thinning behaviour of the fluid is described by the Carreau model. By considering an infinitesimal perturbation, the critical conditions, corresponding to the onset of convection, are determined. At this stage, non-Newtonian effects do not come into play. The critical Rayleigh number decreases and the critical wavenumber increases when the slip increases. For a finite-amplitude perturbation, nonlinear effects enter in the dynamic. Analysis of the saturation coefficients at cubic order in the amplitude equations shows that the nature of the bifurcation depends on the rheological properties, i.e. the fluid characteristic time and shear-thinning index. For weakly shear-thinning fluids, the bifurcation is supercritical and the heat transfer coefficient increases, as compared with the Newtonian case. When the shear-thinning character is large enough, the bifurcation is subcritical, pointing out the destabilizing effect of the nonlinearities arising from the rheological law. Departing from the onset, the weakly nonlinear analysis is carried out up to fifth order in the amplitude expansion. The flow structure, the modification of the viscosity field and the Nusselt number are characterized. The competition between rolls, squares and hexagons is investigated. Unlike Albaalbaki & Khayat (J. Fluid. Mech., vol. 668, 2011, pp. 500–550), it is shown that in the supercritical regime, only rolls are stable near onset.