A nonprofit that is building a $2 million facility for the homeless in Old Town Alexandria says it has reached its fundraising goal after receiving $300,000 from Amazon, Inc., which is opening a headquarters campus in nearby Crystal City.

The donation from Amazon is the latest example of how the retail giant is trying to be a good corporate citizen in Northern Virginia. In June, the company pledged $3 million to support affordable housing in Arlington County and said it would help George Mason University and Northern Virginia Community College create a new, high-tech bachelor’s degree to help meet its future workforce needs. (Amazon founder Jeff Bezos also owns The Washington Post.)

The nonprofit Carpenter’s Shelter is building a facility called New Heights in North Old Town that will include a 60-bed overnight shelter, a day shelter for the chronically homeless and a hypothermia shelter to be used during the winter, the organization said.

There will also be 10 supportive housing units, the group said, and 87 low-rent apartments owned and managed by the Alexandria Community Development Corp.

About 400 people or entities donated money for the project, which is scheduled for completion next year.

Critics of Amazon have said its arrival in Northern Virginia will drive up home prices and rents and exacerbate an already pressing shortage of affordable housing.

Advocates for the poor say the company should do far more to address those and other socio-economic issues.