K8077 Soldering the transistors T8 TIP147 &TIP142

A question about Soldering the two transistors.
When you position the transistor between the pinheaders do I have to solder the transistor ends to the two pins where it is between. Or only to one of them.

It needs to be soldered to both pins…