The first way that colonialism transformed local economies was often to move them from subsistence economies to economies that produced staple crops or that produced other things. For example, an economy in which most people farmed for themselves might change to one in which many people were working on plantations growing things like bananas or in mines.
A second way that colonialism transformed local economies was to make them focus on the needs of the mother country rather than on their own needs. They were no longer trying to produce what their own people wanted and they were no longer trying to do things that would advance their own economic development. Instead, their whole existence revolved around the needs of the colonizers.