A teenage girl has walked free from court, to serve community service, after pleading guilty to causing a crash that killed an unborn baby and seriously injured her mother.