We demonstrate how the quantum paraelectric ground state of SrTiO$_3$ can be accessed via a microscopic $ab~initio$ approach based on density functional theory. At low temperature the quantum fluctuations are strong enough to stabilize the paraelectric phase even though a classical description would predict a ferroelectric phase. We find that accounting for quantum fluctuations of the lattice and for the strong coupling between the ferroelectric soft mode and lattice elongation is necessary to achieve quantitative agreement with experimental frequency of the ferroelectric soft mode. The temperature dependent properties in SrTiO$_3$ are also well captured by the present microscopic framework.