The Treehouse Trust, an educational charity for autistic children based in London, just got several hundred thousand dollars better off.

That’s because Columbia Pictures has paid a mid six-figure sum to option Nick Hornbys bestseller “How to Be Good” for Laura Ziskin to produce.

Hornby donates all his income from movie rights or screenplays to Treehouse, which he co-founded in 1997 with other parents of severely autistic kids.

If the film gets made, there’ll be another bonanza for the charity. The total purchase price, including the option payment, reportedly exceeds the $3 million Hornby got for film rights to his previous novel “About a Boy.”

“How to Be Good” is a complex moral comedy about a well-meaning doctor whose sense of superiority to her angry, cynical husband is challenged when she has an affair, and he decides to become “good” in the fashion of the Gospels.

That turns out to mean redistributing the family’s possessions to the poor, and inviting her patients to live in their house.

The book was published two years ago, but Hornby held out for the best possible pic deal on behalf of Treehouse.

He previously worked with Ziskin on an abortive attempt to develop an HBO series from “Speaking With the Angel,” an anthology of monologues edited by Hornby and published to aid Treehouse.

All of Hornby’s previous books have been made into movies.

“Fever Pitch,” his autobiographical debut about being an obsessive soccer fan, was first produced as a low-budget Brit pic, and is now in the works as an American remake at Fox. Stephen Frears directed “High Fidelity” for Disney, with the action relocated from Hornby’s typical North London milieu to Chicago. And the Weitz brothers made “About a Boy” with Hugh Grant.

Hornby is also carving a career as a screenwriter. His original script “Fast Forward,” co-written with Emma Thompson, is in development at Working Title, which co-produced “High Fidelity” and “About a Boy.”