What do you mean by "a month ago in the court" Who is in court and why? The answer to your question probably hinges on that.
You should retain an experienced immigration lawyer to review all the facts and advise you accordingly.
J Charles Ferrari Eng & Nishimura 213.622.2255 The statement above is general in nature, as not all the facts are known. You should retain an attorney to review all the facts specific to your case in order to receive advise specific to your case. The statement above does not create an attorney/client relationship.
Assuming there are no underlying criminal issues, your spouse files the preference application for you and you file for adjustment of status. You will need to submit documents showing the bona fides of the marriage, biographic documents, a medical exam and affidavit of support. I would hire an experienced immigration attorney as the process can be easily derailed at any time and you end up in deportation proceedings.
You need to provide more information about the type of work visa you entered on and what country you are from as there may be adjustment issues depending on your responses. If you are otherwise eligible to file for adjustment of status, your spouse will need to file a petition for alien relative and application to adjust status along with all relevant supplements and supporting documentation. You should definitely consult with an experienced immigration attorney to discuss your situation in detail before filing.