Approximation theory in the context of probability density function turns out to go beyond the classical idea of orthogonal projection. Special tools have to be designed so as to respect the nonnegativity of the approximate function. We develop here and justify from the theoretical point of view an approximation procedure introduced by Levermore [Levermore, J. Stat. Phys.83 (1996) 1021–1065] and based on an entropy minimization principle under moment constraints. We prove in particular a global existence theorem for such an approximation and derive as a by-product a necessary and sufficient condition for the so-called problem of moment realizability. Applications of the above result are given in kinetic theory: first in the context of Levermore's approach and second to design generalized BGK models for Maxwellian molecules.