I'd start byRather than take on secured debt to pay off her unsecured debt, I suggest helping her in other ways.
Start looking for resources/programs aimed at assisting those who are ill-prepared for retirement, low-income housing, food assistance, whatever. Attempt to negotiate rent down or consider breaking lease if the savings could be significant.
Helping her to budget and prioritize will be key, I personally wouldn't help someone in that situation unless they were willing to be fully transparent with me about their finances, the more someone takes responsibility for their predicament and the more they show willingness/ability to change, the more inclined I am to help. Unless her rent is several hundred per month more than some reasonable alternatives, then fixing the credit card debt alone won't likely prevent her from running into the same issue down the road.
Likely, you could help her significantly for much less of your own money if you helped her through the process of credit-card non-payment (maybe bankruptcy, but likely not even necessary). Negotiating with creditors may be effective, but not sure how valuable a good credit score is in her position. I've never heard a good thing about a for-pay debt-relief company, they are out to make money first, you can help her navigate that process, there are also some non-profits in this space that may be helpful.
California has a 4-year statute of limitations on pursuing debt, so they'd have a limited window to file suit. If it's $40k on one card, they are more likely to pursue legal action than if it's several smaller debts, but you can't squeeze blood from a turnip.
Just a hodge-podge of initial thoughts, may revisit later.