Prime Minister Pierre Trudeau named the architect of Canada's controversial nationalistic energy policy to the key post of finance minister today in a major shuffle of the Liberal Party government.

Trudeau named Marc Lalonde, former energy minister and one of the administration's foremost advocates of a major governmental role in the economy, as finance minister, the senior economic position in the Cabinet. Allan MacEachen, who was finance minister during the country's plunge into its most severe economic crisis of recent times, was shifted to External Affairs.

The changes come amid an extensive effort by Trudeau to bolster an administration troubled by sinking popularity at home and growing friction with its main trade partner, the United States.

With opinion polls showing his popularity at an all-time low, Trudeau this summer launched a new economic strategy that includes mandatory wage restraints for half a million federal employes and voluntary guidelines for prices and wages in the private sector.

Lalonde, 53, said today he sees no reason to vary the current policy, adding that inflation, which the Trudeau government has identified as the prime cause of Canada's poor business climate, must be combatted "with even more vigor."

Lalonde, a tough-minded French Canadian, is a long-time confidant of Trudeau and has been at the center of power for almost 20 years.

But Lalonde's appointment as finance minister, the spokesman for Canada in international financial matters, stunned some observers. He has built up a reputation among American and other foreign investors as a socialist. At home, he has been criticized by much of the business community for introducing nationalistic programs considered by many to have added to economic problems.

As the creator of the 1980 National Energy Program, an ambitious plan to expand Canadian ownership of the rich domestic oil and gas sector, Lalonde has been at the center of controversy. The plan, which American oil executives say discriminates against their companies, has become a persistent irritant in U.S.-Canadian relations.

MacEachen has held the external affairs post previously and is believed to be happy to return there from the precarious job as finance minister. Shifted to the Energy Ministry was Jean Chretien, formerly justice minister. Chretien is one of the few Liberal figures with standing in the western provinces. Mark MacGuigan will be moving from external affairs to head the Justice Department.