Upon receiving his Juris Doctor, Spitzer clerked for Judge Robert W. Sweet of the U.S. District Court for the Southern District of New York, then joined the law firm of Paul, Weiss, Rifkind, Wharton & Garrison. He stayed there for less than two years before leaving to join the New York County District Attorney's office. Spitzer joined the staff of Manhattan District Attorney Robert M. Morgenthau, where he became chief of the labor-racketeering unit and spent six years (1986-1992) pursuing organized crime. Spitzer's biggest case came in 1992, when he led the investigation that ended the Gambino crime family's organized crime control of Manhattan's trucking and garment industries. Spitzer devised a plan to set up his own sweatshop in the city's garment district, where he turned out shirts, pants and sweaters, and hired 30 laborers. The shop manager eventually got close to the Gambinos, and officials were able to plant a bug in their office. The Gambinos, rather than being charged with extortion - which was hard to prove - were charged with antitrust violations. Joseph and Thomas Gambino, the latter being an extremely high-ranking member, and two other defendants took the deal and avoided jail by pleading guilty, paying $12 million in fines and agreeing to stay out of the business. Spitzer left the District Attorney's office in 1992 to work at the law firm of Skadden, Arps, Slate, Meagher & Flom. From 1994 to 1998 he worked at the law firm Constantine and Partners on a number of consumer rights and antitrust cases. As Attorney General, Spitzer stepped up the profile of the office. Traditionally, state attorneys general have pursued consumer rights cases, concentrating on local fraud while deferring national issues to the federal government. Breaking with this traditional deference, Spitzer took up civil actions and criminal prosecutions relating to corporate white-collar crime, securities fraud, Internet fraud, and environmental protection. The New York Attorney General's office has Wall Street (and thus many leading corporate and financial institutions) within its jurisdiction. Also, the New York Attorney General wields greater than usual powers of investigation and prosecution of corporations under New York State's General Business Law. In particular, under the Martin Act of 1921, the New York Attorney General has the power to subpoena witnesses and company documents pertaining to investigations of fraud or illegal activity by a corporation. Spitzer used this statute to allow his office to prosecute cases which have been described as within federal jurisdiction. Spitzer used this authority in his civil actions against corporations and criminal prosecutions against their officers. It proved useful in the wake of several U.S. corporate scandals that began with the collapse of Enron in 2001. Several of these corporations, as well as the brokerage houses that sold their stock, were accused of having inflated stock values by unethical means throughout the 1990s. When inquiries into these allegations by the U.S. Securities and Exchange Commission (SEC) and Congress failed, Spitzer's office used its subpoena power to obtain corporate documents, building cases against the firms both in courtrooms and in public opinion. Under his watch, Spitzer also commissioned a 1999 study of the NYPD's stop-and-frisk practices. In 2004, The Nation endorsed Spitzer as a possible Democratic candidate for vice president, stating that he was "the single most effective battler against corporate abuses in either political party". He was, however, not chosen. In January 2005, the president of the U.S. Chamber of Commerce described Spitzer's approach as "the most egregious and unacceptable form of intimidation we've seen in this country in modern times". On December 8, 2004, Spitzer announced his intention to seek the Democratic nomination for governor of New York. While long rumored, Spitzer's announcement was unusually early--nearly two years before the election. As a result of Spitzer's relative speed in bringing state Democrats to his side, he gained the respect of Democratic leaders nationwide. New Mexico Governor Bill Richardson dubbed Spitzer the "future of the Democratic Party" at a fund raiser held in June 2005 for Spitzer's gubernatorial campaign. In January 2006, Spitzer selected New York State Senate minority leader David Paterson as his choice for lieutenant governor and running mate. After announcing his candidacy, Spitzer was endorsed by numerous New Yorkers, including state Comptroller Alan Hevesi and two former New York City mayors, David Dinkins and Ed Koch. On May 30, 2006, Spitzer and Paterson won the endorsement of the New York State Democratic party. A June 2006 Quinnipiac University Polling Institute poll showed him leading Nassau county executive Thomas Suozzi 76-13 percent. On July 25, 2006, he faced Suozzi in a gubernatorial debate held at Pace University in Manhattan, discussing issues such as public authorities and Medicaid. When asked about marijuana, Spitzer stated that he disagrees with medicinal use of the drug, claiming that other medicines were more effective. In the Democratic primary held on September 12, 2006, Spitzer handily defeated Suozzi, securing his party's nomination with 81 percent of the vote. On October 5, Spitzer addressed the Empire State Pride Agenda and declared that he would work as governor to legalize gay marriage in New York. Spitzer was elected governor on November 7, 2006, when he defeated Republican John Faso and Libertarian John Clifton, among others, with 69 percent of the vote. He won with the largest margin of victory ever in a New York gubernatorial race.

Answer this question "How did he do that?" by extracting the answer from the text above.
Spitzer devised a plan to set up his own sweatshop in the city's garment district, where he turned out shirts, pants and sweaters, and hired 30 laborers.