In a major shift of policy, France is now counting on Somalia to emerge as the dominant power in the Horn of Africa and to help arrange a peaceful transition to independence this summer by the last French colony on the African continent.

The French shift away from Ethiopian-aligned political groups in the colonial Territory of the Afars and Issas has been in the making for months but it is only now taking substantive form in government actions and private comments by French officials. The policy change will not be publicly acknowledged.

The French shift could lead to eventual conflict between Ethiopia and Somalia, long-time hostile neighbors. There is growing concern that any conflict in the area could at least indirectly involve the United States and the Soviet Union because of shifting alliances in the Horn of Africa.

The change appears to stem in large part from the success that French officials believe Saudi Arabia is having in swinging Somalia out of the Soviet orbit and into a more moderate and possibly pro-Western position. The turmoil in Ethiopia is also a factor in French thinking, which is evidently shared by many top American officials who would welcome such a French shift in policy.

The Saudis have embarked on a major campaign to extend their influence all along the Red Sea, according to Arab sources who point to the nearly total alignment of Saudi policy with Egypt and Sudan and last year's successful Saudi effort to come to a foreign policy accomodation with the Marxist government in South Yemen.

The Territory of the Afars and Issas - more commonly known by the name of its port and only large town, Djibouti - overlooks the Bab el Mendab Straits at the southern end of the Red Sea.

Wedged into the coastline between Somalia and Ethiopia, the 8,500-squre-mile territory has long been the subject of war-like threats between the Somalis, who claim it as part of their national territory, and the Ethiopians, who are dependent on the Djibouti port and rail link to Addis Ababa.

There is no exact count, but it is generally believed that the territory's estimated population of 240,000 is divided about equally between the tribes of the Issas, who are technically related to the Somalis, and the Afars, who are closer to the Ethiopians.

In recent years, French colonial rule was based on local governments dominated by the Afars and friendly to Ethiopian Emperor Haile Selassie, who was overthrown by radical soldiers in 1974.

When France committed itself last year to ending colonial rule this year and holding fair elections, support for local Prime Minister Ali Aref quickly evaporated. The French abandoned him, put a caretaker government in place and tried to get the Afar and Issa leaders to agree to sharing power in the independent state.

Ali Aref's group and other important Afars have boycotted the independence talks, however, and refused to put up candidates for a compromise single slate for the 65-member Parliament to be elected May 8.

Somali-backed political groups, officially nominated a list of 30 Afars, 33 Issas and 2 Arabs Saturday night. In a key sign of the new alignment with the Somalis, Oliver Stirn, the French Cabinet official in charge of the territory, said yesterday that the list was "very representative." I think the different elements of the populations of the territory are fairly represented."

Reassured by the near certainty of a friendly government taking control at independence and the prospect of an ultimate political union, the Somalis have pledged not to annex the territory.

Some French officials appear to feel that the Ethiopians are too tied down with internal rebellions and strife to start a new conflict now, but they admit that this is still a dangerously uncertain estimate.

France originally pledged to keep the present contingent of 4,000 to 6,000 soldiers in the territory if the government requests them after independence. As recently as a month ago, however, President Valery Giscard d'Esting's government was seriously considering a complete and rapid pullout rather than risk involving French troops in a conflict that could cost Giscard vital support at home.

That option appears now to have been discarded.

Instead, France is reinforcing the Foreign Legion and other troops in Djibouti for the election period. It is now likely, according to reliable sources, that 2,000 French soldiers will stay behind as advisers after independence. More important strategically is the small naval task force that will be based in Djibouti.