If the wife does not agree to her husband being away for more than six months, the case should be referred to the qaadi (judge) so that he can correspond with her husband and order him to return. If he does not return, then the judge may rule as he sees fit, either divorce or annulment of the marriage. This applies whether the husband is travelling and absent for a reason such as needing money and not being able to find work in his own country, or if there is no excuse, rather it is for love of money, as mentioned in the question.
But the difference between there being an excuse and there being no excuse is that if the husband has an excuse, he is not obliged to return, and he is not sinning if he does not return.
But if he has no excuse, then he must return and he is sinning if he does not return.
In either case the wife has the right to ask for a divorce, so as to ward off harm from herself.
It is not permissible for the husband to keep his wife if she is being harmed. Allaah says (interpretation of the meaning):
“But do not take them back to hurt them”[al-Baqarah 2:231]
“either take them back in a good manner or part with them in a good manner”[al-Talaaq 65:2]