Penalized splines are a popular method for nonparametric function estimation in partial linear generalized regression models. Constrained versions are presented in this talk, which are useful if the function is known to be increasing or convex. The shape assumptions often fall into the category of a priori knowledge, but occasionally the research question might concern the shape. A model-selection criterion for determining if the constraints hold is shown to have nice large-sample properties and to perform well in small samples. Several applications are presented.