We propose a new estimator for boundary correction for kernel density estimation. Our method is based on local Bayes techniques of Hjort (Bayesian Statist. 5 (1996) 223). The resulting estimator is semiparametric type estimator: a weighted average of an initial guess and the ordinary reflection method estimator. The proposed estimator is seen to perform quite well compared to other existing well-known estimators for densities which have the shoulder condition at the endpoints.