A year after vowing to put more books in the hands of the city’s homeless children, Chancellor Carmen Fariña has helped oversee the creation of 20 small libraries in family shelters throughout the city.

Scholastic Inc. donated 3,400 books to create libraries at 20 family shelters for a pilot program that Fariña said she hopes to eventually expand to more than 40 shelters. The shelters in the pilot program — which serve 4,000 children across Brooklyn, the Bronx, Manhattan, and Queens — each have 170 books in their libraries, including bilingual books.

“This is a dream come true,” Fariña said after reading to a group of three- and four-year-olds living at the HELP Bronx Crotona Park North shelter that provides transitional housing for nearly 100 families. “These are kids who are eager to learn.”

Last April, after hearing from Department of Homeless Services Commissioner Gilbert Taylor that 22,000 children slept in homeless shelters, but none of them had libraries, Fariña vowed to get books into those nearly 160 family shelters. Taylor recalled that conversation standing in front of the new bookshelves at the Bronx shelter Monday.

“It really began with books,” Taylor said. “Something as fundamental as having books and being able to get them outside of school. And to see it actually take shape in this shelter is something that is very heart-warming.”

The 20 shelters, the majority of which are in Brooklyn and the Bronx, were chosen last year based on whether they had space for a small library, according to the homeless services department.

“That’s not a strong number, but it’s only the beginning,” Fariña said.

The city said the books were the start of a broader literacy program that will involve placing volunteers at the shelter libraries, adding reading workshops for parents and children hosted by partner organizations, and using the Queens, Brooklyn, and New York public libraries to connect shelter residents to existing services.

For now, the city is trying simply to provide access to books, most of which are on school reading lists, Fariña said.

“A lot of these books were chosen so that parents could read to children and even parents who are at a certain literacy level can read,” she said. “Some of the adolescent books here would be actually just as good in an adult’s hands.”

Fariña started the afternoon by reading one of the new books to about 15 squirmy three- and four-year-olds living at the Bronx shelter. And while she said she “couldn’t keep them still” during the reading, all hope of containing the children’s excitement went out the window when a costumed Clifford the Big Red Dog walked into the room.

“These kids are actually really hopeful, they’re excited, they’re learning,” Fariña said.