A natural ring basis for the shuffle algebra and an application to group schemes