The last time Phil Esposito played in the Stanley Cup final was in 1974, with Boston. The following year, he was dealt to the dreary New York Rangers and just about abandoned hope of reaching that pinnacle again.

Tonight, however, if the Rangers can beat the New York Islanders in Madison Square Garden, Esposito will be a finalist once more, and it would compensate for years of bitterness and abuse.

Esposito, now 37, came to the Rangers with Carol Vadnais in a deal for Brad Park and Jean Ratelle that shocked the hockey world. It certainly stunned those in the upper reaches of the Garden, and they maintained the distaste for Esposito that had flourished while he wore Boston's black and gold.

Esposito was no happier with the swap than those Ranger fans and he recalled the day it happened, when Don Cherry awoke him in Vancouver with the news that he had been traded:

"I told him, 'If you tell me I've been traded to New York, I'm gonna scream.' He told me I'd been traded to New York-and I screamed."

The other night, though, Esposito leaned back in his locker, adorned with a variety of horns to ward off evil spirits, and admitted the horns really hadn't deserted him when he was forced to move to New York.

"I guess I've got Ranger blood flowing in me now, because I've really become a Ranger," Esposito said. "I've gotten to like New York, to love New York. Donna (his wife) and I live right in the city. We go out and eat almost every night and it's great.

"And I want to finish my career with the Rangers, because that's the best of part of what's happened here. We aren't that far away from winning it all. This franchise has turned completely around."

Esposito credits Coach Fred Shero with the turnabout, saying "He's a good coach, a really good coach. They told him to take over the hockey club and do whatever he had to do to make it a winner. He has, and he will."

A lot of folks think Esposito deserves credit, too, particularly for working with the youngsters on the team. He led the club with 42 goals during the regular season and, in the playoffs, his 16 points are good for a share of second place with Montreal's Guy Lafleur. The Stanley Cup points leader with 18 is Ranger rookie Dan Maloney, who benefits from playing left wing on Esposito's line.

"Anything I do wrong, Phil points out to me, and anything I do right he encourages me," Maloney said.

A sports editor lured to a Ranger playoff game by tales of the nonstop excitement suddenly burst out with: "My God, even Esposito is checking."

For years, Esposito has worn the label of goal scorer, ever since he set the NHL record of 76 in 1970-71. Few realize he also is an adept passer and a capable checker.

It has taken something extra for a man of 37 to maintain the pace with the younger players in this series, but Esposito has not missed a shift. And if it takes longer to recover afterward, well, the winning makes up for it.

"My legs aren't so strong and I get tired faster," Esposito said. "I try to get by on my wits more. I lost a little bit of reaction time-the reflexes aren't what they were.But I can still play the game and I still like to play. I feel good and I'd like to be around for one more Cup."

Early this season, it did not appear that Esposito would be around New York for more than a few days. He was remored headed to Minnesota and then Shero supposedly had arranged a swap for Chicago's Jim Harrison, which fell through when an examination showed Harrison with back trouble. At the time Esposito was ready to pack. Now he is glad it didn't happen.

"There was time when I wouldn't have minded being traded from New York," Esposito said. "I never asked for it, but I wouldn't have minded it. Now I just want to stay here."

The fans who had made life misserable for Esposito and his teammates responded to the turnabout under Shero and chants "Es-po" were not unusual this season. When Esposito registered a hat trick against Washington, the record 30th of his career, the spectators went crazier than usual. And when Esposito was bypassed for the NHL All-Star team that faced the Soviet Union, they complained bitterly and raised a "Where's Espo?" sign in protest.

Fans in Washington are still not enamored of the man who has saluted them with his middle finger on several occasions. But Peter O'Malley, the former president of the Capitals, said, "There is nobody is willing to more for the sport than Phil Esposito."

A year ago, Esposito was presented the Lester Patrick Award for his service to hockey in the United States. For a man who has scored 676 regular-season goals and 56 more in playoffs, there are few rewards left. The tantalizing possibility, once so remote, is a third Stanley Cup ring, to go with the two earned in Boston.

While the Rangers take a 3-2 lead into their semifinal against the Islanders, the Montreal Canadiens carry a 3-2 advantage into Boston. If the Rangers and Montreal win, the final series will start Thursday in the Montreal Forum. If either Should lose, it would require a decisive semi-final round game Thursday.