Foliations in the complex projective plane are uniquely determined by their
singular locus, which is in correspondence with a zero-dimensional ideal.
However, this correspondence is not surjective. We give conditions to determine
whether an ideal arises as the singular locus of a foliation or not.
Furthermore, we give an effective method to construct the foliation in the
positive case