Let's follow Peskin and Schroeder section 9.2, page 282.
The Hamiltonian of a free real scalar field is
$$H=\int{}d^3x[\frac{1}{2}\pi^2+\frac{1}{2}(\nabla\phi)^2+V(\phi)]$$
so the expression for the functional integral is
$$\langle\phi_b|e^{-iHT}|\phi_a\rangle=\int\cal{D}\phi\cal{D}\pi{}e^{i\int_ 0^Td^4x\,(\pi\partial_t\phi-\frac{1}{2}\pi^2-\frac{1}{2}(\nabla\phi)^2-V(\phi))}$$
then Peskin and Schroeder say that in order to integrate over the $\pi$ you just have to complete the square which gives us
$$\langle\phi_b|e^{-iHT}|\phi_a\rangle=\int\cal{D}\phi\cal{D}\pi{}e^{i\int_ 0^Td^4x\,(\frac{i}{\sqrt{2}}\pi-\frac{i}{\sqrt{2}}\partial_t\phi)^2}e^{i\int_0^Td^4x\,\cal{L}}$$
now, my question. How do you get rid of the first exponent? My teacher said something about Gaussian integrals but this doesn't convince me. This is not a regular integral, this is a functional integral, so we shouldn't use directly the formula for Gaussians here. How do you perform this integral without resorting to hand wavy arguments?