Using the backstepping approach we recover the null controllability for the heat equations with variable coefficients in space in one dimension and prove that these equations can be stabilized in finite time by means of periodic time-varying feedback laws. To this end, on one hand, we provide a new proof of the well-posedness and the ``optimal"  bound with respect to damping constants for the solutions of the kernel equations; this allows one to deal with variable coefficients, even with a weak regularity of these coefficients. On another hand, we  establish the well-posedness and estimates for the heat equations with  a nonlocal boundary condition at one side.