Line a 9-by-5-inch loaf pan with plastic wrap, leaving a few inches of overhang all around. Using scissors, cut the carton away from the pistachio ice cream and slice the ice cream into 1/2-inch-thick slabs. Pack the slabs into the loaf pan, pressing to fill any gaps. Freeze until firm, about 10 minutes. Repeat with the sorbet for the middle layer and then the frozen yogurt for the top layer, freezing the terrine for 10 minutes between layers. Press a sheet of plastic wrap on top of the terrine, fold the overhanging wrap over and freeze until firm, about 1 hour.
Unmold the terrine and transfer to a platter. Serve the terrine in slices and sprinkle with the pistachios.