The Pearson Foundation, the charitable arm of one of the nation’s largest educational publishers, will pay $7.7 million to settle accusations that it repeatedly broke New York State law by assisting in for-profit ventures.

An inquiry by Eric T. Schneiderman, the New York State attorney general, found that the foundation had helped develop products for its corporate parent, including course materials and software. The investigation also showed that the foundation had helped woo clients to Pearson’s business side by paying their way to education conferences that were attended by its employees.

Under the terms of the agreement to be announced on Friday, the money, aside from $200,000 in legal expenses, will be directed to 100Kin10, a national effort led by a foundation, the Carnegie Corporation, to train more teachers in high-demand areas, including science, technology, engineering and math.

“The fact is that Pearson is a for-profit corporation, and they are prohibited by law from using charitable funds to promote and develop for-profit products,” Mr. Schneiderman said in a statement. “I’m pleased that this settlement will direct millions of dollars back to where they belong.”