What did the French colonial troops do when they were sent to China during the Boxer Rebellion - were they engaged in combat? Did they serve as a peace keeping force?
Great question! The Boxer Rebellion was a series of shameful and unfortunate acts by both sides, and finding detailed information on France's role was tricky. That being said, I have searched all aspects of France's role, and the roles of France's officers, and I believe I have found some great resources to help answer your question.
So China, at the time, had been being occupied and carved up by various foreign powers for years; as well as having many of its citizens attacked and forcibly converted to Christianity. France, during this time, had laid its claim to Vietnam (something that would have more than a centuries worth of fallout), but maintained a legation in Beijing near the legations of Great Britain, Belgium, the Netherlands, the United States, Russia, and Japan. When fighting began, these legations were linked to form a fortress to protect the diplomats and officials within. On June 20th, with the attacks on the legations persisting and the death of a German envoy, China declared war on the foreign countries. Around the same time, a force known as the Eight-Nation Alliance (comprised of France, Great Britain, the United States, Japan, Russia, Austro-Hungary, Italy, and Germany) was formed to help relieve the soldiers fighting in the legations.
So as for the role of a young, French soldier; he would have began fighting in one of two fronts. The first being as an original soldier of the French legation. If he would have been guarding the legation, he probably would've been in China for maybe a year or more. The soldier may have also been part of the Alliance, coming from French Indo-China to aid in the relief of the legations.
So we know why they were there, and when they came, so on to what they did when they got there. Interactions between the French and Chinese were violent, torturous and bloody. Maybe not in every instance, but the limited amount of history written on the topic does not put the French (or any Western power, really) in the best light. After the signing of the Protocol of 1901, in which the Chinese Empress agreed to pay reparations to the Western powers, boxers were put to death in public view. The merciless methods of execution (such as torture, starvation, and beheading) were meant to send the message that rebellion wouldn't be tolerated, but ended up just telling the Chinese how savage the Western nations could be. According to one witness, “[T]he conduct of the Russian soldiers is atrocious, the French are not much better, and the Japanese are looting and burning without mercy.”
Fortunately, France's role wasn't all bad. French soldiers were also used to protect farms, missions, and aid in the construction of roads and railways. Of course, this silver lining also comes with a cloud, as the French built those roads on cemeteries, which they were forbidden to do under an agreement with the Ningpo Guild.
So, after all this history, let's quickly wrap up your question. A French soldier would've either fought from within the legate fortress, or been a part of the Alliance to retake the fortress. The battles the soldier would have fought in were the siege of Peking, and the attack on Shanghai. After the fighting stopped in 1901, the soldier would have participated in the execution of boxer rebels and protection of missionaries.