We propose new techniques for 2-D shape/contour completion, which is one of the important research topics related to shape analysis and computer vision, e.g. the detection of incomplete objects due to occlusion and noises. The purpose of shape completion is to find the optimal curve segments that fill the missing contour parts, so as to acquire the best estimation of the original complete object shapes. Unlike the previous work using local smoothness or minimum curvature priors, we solve the problem under a Bayesian formulation taking advantage of global shape prior knowledge. With the priors, our methods are expert in recovering significant shape structures and dealing with large occlusion cases. There are two different priors adopted in this paper: (i) A generic prior model that prefers minimal global shape transformation (including non-rigid deformation and affine transformation with respect to a reference object shape) of the recovered complete shape; and (ii) a class-specific shape prior model learned from training examples of an object category, which prefers the reconstructed shape to follow the learned shape variation models of the category. Efficient contour completion algorithms are suggested corresponding to the two types of priors. Our experimental results demonstrate the advantage of the proposed shape completion approaches compared to the existing techniques, especially for objects with complex structure under severe occlusion.