In this paper, we propose an expectation-maximization (EM) approach to separate a shape database into different shape classes, while simultaneously estimating the shape contours that best exemplify each of the different shape classes. We begin our formulation by employing the level set function as the shape descriptor. Next, for each shape class we assume that there exists an unknown underlying level set function whose zero level set describes the contour that best represents the shapes within that shape class. The level set function for each example shape in the database is modeled as a noisy measurement of the appropriate shape class's unknown underlying level set function. Based on this measurement model and the judicious introduction of the class labels as the hidden data, our EM formulation calculates the labels for shape classification and estimates the shape contours that best typify the different shape classes. This resulting iterative algorithm is computationally efficient, simple, and accurate. We demonstrate the utility and performance of this algorithm by applying it to two medical applications.