What government did Jean-Jacques Rousseau prefer?
Rousseau's ideal system of government is an example of what's called social contract theory. There are a number of different variations on the social contract theme in political thought, but they all share the same basic assumption—that the exercise of political power is based on some kind of agreement between the governors and the governed. In most cases, social contract theory is concerned with limiting the power of the state, although Hobbes's vision of government is an obvious exception here.
Rousseau believed in popular sovereignty, the idea that power ultimately resided with the people. This may not seem particularly radical today, but, in Rousseau's time, most states were ruled by absolute monarchs. They alone enjoyed political sovereignty. The political role of the people in such states was limited, and, even then, "the people" tended to mean a wealthy, property-owning elite.
The ideal state, for Rousseau, gives expression to what he calls the general will. This is the collective will of the state's citizens, putting aside their selfish interests to achieve the common good. Unlike in a modern democracy, the people don't come together to debate certain issues and then thrash out a solution or compromise; instead, they reflect on their interests as citizens, rather than as individuals. The interest of each citizen qua citizen is always justice and the public good. In that sense, the general will of a public assembly isn't artificially constructed or imposed; it emerges naturally from each citizen, reflecting rationally on the good of all.
In this ideal state, the law always expresses the general will. That being the case, any individual who breaks the law is acting against his or her interests as a citizen. Lawbreakers are not just attacking the instituted government; they're also acting against a higher interest than that of the self-seeking individual.
A number of scholars down the years have drawn attention to what they see as the potentially authoritarian implications of this particular aspect of Rousseau's political thought. In a notorious passage of The Social Contract, Rousseau states that individuals sometimes need to be forced to be free to get them to obey the law. The idea that someone can be forced to be free sounds rather ridiculous, sinister even. But we should remember that, in Rousseau's ideal state, the government is the expression of the will of all. So in forcing someone to be free, the government is simply bringing the individual lawbreaker back to his or her true self—a rational decision-maker who's chosen the system in which they live, one consistent with the dictates of justice and the common good.
The short answer to this question is that Rousseau believed in government based upon the will of the people and created through their consent. Rousseau is somewhat elusive and contradictory in spelling out what such a government should look like, but in general he thought a direct democracy, operating at the local (city, or canton) level was the best form of government. The crucial thing for Rousseau was that government ought to express what he called the "general will" of the people. This concept, which is different from the notions of "majority rule" or "popular sovereignty" that are associated with representative government, was consistent with his assertion that the sovereign could never really represent the people, but only its own will. But at the same time, Rousseau said that government needed educated, competent men to carry out its basic functions. While he thought these men should be elected, he also realized they would probably gain power over the people. So he, like many thinkers of his time, saw republics as very difficult to maintain. When reading Rousseau, in fact, it is probably more important to think about how he thought individuals should behave in an ideal government than what the structure of that government should look like. Rousseau, like many of his contemporaries, emphasized virtue as essential to the maintenance of a republic. People should act in the interest of the general will rather than out of naked self-interest, and they should be educated accordingly.