Praise be to Allah.
What is khul’?
Khul’ means the separation of the wife in return for a payment; the husband takes the payment and lets his wife go, whether this payment is the mahr which he gave to her, or more or less than that.
Khul’ in the Quran
The basic principle concerning this is the verse in which Allah says (interpretation of the meaning):
“And it is not lawful for you (men) to take back (from your wives) any of your Mahr (bridal-money given by the husband to his wife at the time of marriage) which you have given them, except when both parties fear that they would be unable to keep the limits ordained by Allah (e.g. to deal with each other on a fair basis). Then if you fear that they would not be able to keep the limits ordained by Allah, then there is no sin on either of them if she gives back (the Mahr or a part of it) for her Khul (annulment).” [al-Baqarah 2:229]
Khul’ in the Sunnah
The evidence for that from the Sunnah is that the wife of Thabit ibn Qays ibn Shammaas (may Allah be pleased with him) came to the Prophet (peace and blessings of Allah be upon him) and said, “O Messenger of Allah, I do not find any fault with Thabit ibn Qays in his character or his religious commitment, but I do not want to commit any act of kufr after becoming a Muslim.” The Prophet (peace and blessings of Allah be upon him) said to her, “Will you give back his garden?” Because he had given her a garden as her mahr. She said, “Yes.” The Prophet (peace and blessings of Allah be upon him) said to Thabit: “Take back your garden, and divorce her.” (Narrated by al-Bukhari, 5273).
From this case the scholars understood that if a woman cannot stay with her husband, then the judge should ask him to divorce her by khul’; indeed he should order him to do so.
How is khul’ done?
With regard to the way in which it is done, the husband should take his payment or they should agree upon it, then he should say to her “faraqtuki” (I separate from you) or “khala’tuki (I let you go), or other such words.
Talaq (i.e., divorce) is the right of the husband, and does not take place unless it is done by him, because the Prophet (peace and blessings of Allah be upon him) said: “Talaq is the right of the one who seizes the leg (i.e., consummates the marriage)” i.e., the husband. (Narrated by Ibn Majah, 2081; classed as hasan by al-Albani in Irwa al-Ghalil, 2041).
Hence the scholars said that whoever is forced to divorce his wife by talaq wrongfully, and divorces her under pressure, then his divorce is not valid. (Al-Mughni, 10/352)
Valid reasons for divorce
With regard to what you mention, that a woman in your country might arrange her own divorce through the man-made laws, if this is for a reason for which it is permissible to seek a divorce, such as disliking her husband, not being able to stay with him or disliking him because of his immoral ways and indulgence in haram actions, etc., there is nothing wrong with her seeking divorce, but in this case she should divorce him by khul’ and return to him the mahr that he gave to her.
But if she is seeking divorce for no reason , then that is not permissible and the court ruling on divorce in this case does not count for anything in terms of shari’ah. The woman still remains the wife of the man. This gives rise to a new problem, which is that this woman is regarded as a divorcee in the eyes of the (man-made) law, and can remarry after her ‘iddah ends, but in fact she is still a wife and not a divorcee.
Shaykh Muhammad ibn Salih al-‘Uthaymin (may Allah have mercy on him) was asked about a similar matter and said:
“Now we have a problem. The fact that she is still married to him means that she cannot marry anyone else, but according to the court ruling she is apparently divorced from him, and when her ‘iddah ends she can remarry. I think that the only way out of this problem is that good and righteous people should get involved in this matter, to bring about reconciliation between the man and his wife. Otherwise she has to give him some payment, so that it will be a proper shar’i khul’.” (Liqa’ al-bab al-Maftuh by Shaykh Muhammad ibn ‘Uthaymin, no. 54; 3/174)
And Allah knows best.