We calculate multicolour light curves (LCs) of supernovae (SNe) from red supergiants (RSGs) that have exploded within a dense circumstellar medium (CSM). Multicolour LCs are calculated by using the multigroup radiation hydrodynamics code stella. If the CSM is dense enough, the shock breakout signal is delayed and smeared by the CSM and the kinetic energy of SN ejecta is efficiently converted to thermal energy, which is eventually released as radiation. We find that explosions of RSGs are affected by the CSM in the early epochs, when the mass-loss rate just before the explosions is higher than ∼10−4 M⊙ yr−1. Their characteristic features are that the LC has a luminous round peak followed by a flat part, that multicolour LCs are simultaneously bright in both ultraviolet and optical at the peak, and that the photospheric velocity is very low at these epochs. We calculate LCs for various CSM conditions and explosion properties, i.e. mass-loss rates, radii of the CSM, density slopes of the CSM, explosion energies of SN ejecta and the SN progenitors contained within, to see their influence. We compare our model LCs with those of ultraviolet-bright Type IIP SN 2009kf and show that the mass-loss rate of the progenitor of SN 2009kf just before the explosion is likely to be higher than 10−4 M⊙ yr−1. Combined with the fact that SN 2009kf is likely to be an energetic explosion and has large 56Ni production, which implies that the progenitor of SN 2009kf is a massive RSG, our results indicate that there could be some mechanism to induce extensive mass loss in massive RSGs just before their explosions.