My answer differs somewhat from the others provided.
True, you have to be very careful. However, in some instances this strategy can work.
What the company is proposing to do is called a "Subject To." They buy your home "subject to" the existing mortgage. Your name remains on the loan. They own the house. And, yes, that's very risky to you. At some point in the future, they will sell or refinance your loan, and you'll be off the mortgage. Their argument--and it's accurate for the legitimate companies out there--is that they'll make up the back payments, help reestablish your credit by paying the mortgage on time, and at some point get your name off the mortgage. You might end up with a share of any profits, as well.
A "Subject To" is legal. However, it will violate your lender's "due on sale" clause. In your case, that's really not a problem, since your heading to foreclosure anyway. But, as a practical matter, in today's economy lenders would much rather have someone else (the investment firm) paying your mortgage than for you to remain unable to, and for the lender to have to foreclose.
To correct another answer below, this is not an option contract. Ownership WILL transfer. Under an option, an investor would have the ability to assign a purchase contract to someone else. However, in your case (assuming you have little or no equity), that wouldn't make sense.
I know reputable investors who do "Subject Tos." It's a legitimate strategy that, when executed properly and ethically, is a win-win-win for all involved. However, to repeat, it's very, very risky for you. And before you even consider it, you should explore the other options mentioned below: loan modification, short sale, examination of paperwork to detect errors when you purchased the property, and so on.
Hope that helps. - Yesterday, 07:30