Allen pleads no contest to endangerment