In this presentation, we discuss a geometric approach to shape constrained function estimation which allows a much broader notion of shape constraint than in the literature. In its basic form, we consider an M-modal constraint, where the target function has M known peaks, and M can be any natural number. The framework can handle both general functions as well as probability density functions. The algorithm is based on starting with an initial function estimate with the correct number of peaks, and then using a group action of a diffeomorphism group to transform the initial shape towards the target function shape. The estimation of the optimal diffeomorphism is carried out via a nonlinear map to the tangent space of a unit Hilbert sphere. The algorithm is extended to a more general notion of shape, and the framework extended to include conditional density functions as well. Numerical properties and practical relevance of the algorithm is illustrated through simulation studies and real data examples.