We provide scaling relations for the Nusselt number $Nu$ and the friction coefficient $C_{S}$ in sheared Rayleigh–Bénard convection, i.e. in Rayleigh–Bénard flow with Couette- or Poiseuille-type shear forcing, by extending the Grossmann & Lohse (J. Fluid Mech., vol. 407, 2000, pp. 27–56, Phys. Rev. Lett., vol. 86, 2001, pp. 3316–3319, Phys. Rev. E, vol. 66, 2002, 016305, Phys. Fluids, vol. 16, 2004, pp. 4462–4472) theory to sheared thermal convection. The control parameters for these systems are the Rayleigh number $Ra$, the Prandtl number $Pr$ and the Reynolds number $Re_S$ that characterises the strength of the imposed shear. By direct numerical simulations and theoretical considerations, we show that, in turbulent Rayleigh–Bénard convection, the friction coefficients associated with the applied shear and the shear generated by the large-scale convection rolls are both well described by Prandtl's (Ergeb. Aerodyn. Vers. Gött., vol. 4, 1932, pp. 18–29) logarithmic friction law, suggesting some kind of universality between purely shear-driven flows and thermal convection. These scaling relations hold well for $10^6 \leq Ra \leq 10^8$, $0.5 \leq Pr \leq 5.0$, and $0 \leq Re_S \leq 10^4$.