We study the phase transition of a real scalar ${\ensuremath{\varphi}}^{4}$ theory in the two-loop $\ensuremath{\Phi}$-derivable approximation using the imaginary time formalism, extending our previous (analytical) discussion of the Hartree approximation. We combine fast Fourier transform algorithms and accelerated Matsubara sums in order to achieve a high accuracy. Our results confirm and complete earlier ones obtained in the real time formalism [A. Arrizabalaga and U. Reinosa, Nucl. Phys. A785, 234 (2007)] but which were less accurate due to the integration in Minkowski space and the discretization of the spectral density function. We also provide a complete and explicit discussion of the renormalization of the two-loop $\ensuremath{\Phi}$-derivable approximation at finite temperature, both in the symmetric and in the broken phase, which was already used in the real time approach, but never published. Our main result is that the two-loop $\ensuremath{\Phi}$-derivable approximation suffices to cure the problem of the Hartree approximation regarding the order of the transition: the transition is of the second order type, as expected on general grounds. The corresponding critical exponents are, however, of the mean-field type. Using a ``renormalization group-improved'' version of the approximation, motivated by our renormalization procedure, we find that the exponents are modified. In particular, the exponent $\ensuremath{\delta}$, which relates the field expectation value $\overline{\ensuremath{\phi}}$ to an external field $h$, changes from 3 to 5, getting then closer to its expected value 4.789, obtained from accurate numerical estimates [A. Pelissetto and E. Vicari, Phys. Rept. 368, 549 (2002)].