Colle and Salvetti have proposed a two-body functional for the calculation of correlation energies and have obtained excellent numerical results when applied to small molecules. To derive the functional they took a particular form for the second-order density matrix and used the constraining equation between the second- and first-order density matrices. We have derived an equation for the functional by imposing Schrödinger's equation via the quantum density matrix hierarchy equations. We have solved the equation for the simple case of helium and have obtained the same functional form as Colle and Salvetti.