A Randor woman was sentenced to more than 40 years in prison Monday after she pleaded guilty to more than a dozen counts of endangering children last month.