Alignment of curves by nonparametric maximum likelihood estimation can be done when the individual transformations of the time axis is assumed to be of a parametric form, known up to some individual unobserved random parameters. We suggest a fast algorithm, based on a Laplace approximation, to find the nonparametric maximum likelihood estimator (NPMLE) for the shape function. We find smooth estimates for the shape functions without choosing any smoothing parameters or kernel function and we estimate realizations of the unobserved transformation parameters that align the curves to satisfy the eye. The method is applied to two data examples of electrophoretic spectra on feta cheese samples and on wheat samples, respectively. A small simulation study indicates reasonable robustness against assumptions regarding the error covariance function.