I'm unclear as to what your question is. Can you clarify?
Typically to "stop" a foreclosure from happening, you'd need to do one of the following:
1. Pay your mortgage payment on time each month as agreed.
2. If you are behind on your mortgage, pay the past due amount to current.
3. Pay the balance of the loan in full.
Hope that helps!