Salamence appeard in the Movie Volcanion and the Mechanic Marvel.
In Volcanion and the Mechanical Marvel, a Salamence that can Mega Evolve was under the control of Levi and Cherie's Mega Wave. Salamence was used to battle Ash's Noivern and Greninja. It was later freed from their control when Alva's Mega Wave Crystal was destroyed, and it escaped.
As for what it did, it was in control of Levi and Cherie, who were the secondary antagonists of the Movie, which makes the Mega Mence a Pokémon of the bad guys.
It was later freed from their control when the Mega Wave Crystal was destroyed, and then it escaped.
As for the moves it knew, it supposedly used the stupidest move of all time like couldn't it use something like Dragon Claw Hyper Beam only.
It made an appearance in the ending segment of Mega Evolution Special II, where I dunno what it did :/
Hope it helped!!