- Manage the resource to maximize its value, and
- Distribute the surplus from the resource to all citizens.
On (1), for example, the government of Brazil requires that Petrobras (its national oil company) use domestic suppliers (instead of the lowest or most qualified bidder) and that it sell fuel below cost (thereby requiring Petrobras to import fuel to sell at a loss).
On (2), for example, the government of Saudi Arabia diverts most profits from oil into the hands of the royal family, rather than a sovereign wealth fund or to citizens. This concentration of wealth drives massive inequality and dislike of the government -- two factors that may explain Saudi citizens participation in 9/11.
I could give many examples of how violating (1) and/or (2) has resulted in resource depletion, corruption, poverty, and so on.
Bottom Line: The only way to avoid the "resource curse" is to manage the resource to its full value and share that value among ALL its owners.