At long last, Ray Shamie found himself in the company of the political elite. He began face-to-face with Sen. Edward M. Kennedy (D-Mass.) and wound up fighting to keep Kennedy from draping him in the policies of President Reagan.

"The Reagan economic program . . . is a riverboat gamble that has not paid off," said Kennedy, who has been a senator for 20 years.

"You're not running against Ronald Reagan -- not yet," said his Republican opponent. "You're running against me, Ray Shamie."

In his effort to defeat his famous Democratic opponent, Shamie has distributed bumper stickers that read, "You Can Call Me Ray." But, according to all the polls, after Nov. 2 the people of Massachusetts will not be calling him senator.

The latest statewide survey, conducted last week for The Boston Globe, listed Kennedy with 60 percent and Shamie with 27. Libertarian Howard S. Katz had 1 percent, and 12 percent were undecided.

In the Massachusetts gubernatorial race, Democrat Michael Dukakis, a former governor, is favored heavily to defeat Republican John Winthrop Sears, who has been running a very low-key campaign.

Months ago, national conservative organizations targeted Kennedy for defeat.

But the effort failed to attract a well-known opponent to run against Kennedy, and his reelection is now conceded by most Republican strategists.

Shamie, a conservative Republican businessman, has tried to attract public attention by offering a $10,000 reward for anyone who could arrange a debate with his liberal Democratic opponent.

Kennedy agreed after the Sept. 14 primary and asked that the money be given to a charity run by a Catholic school that offered to host the debate. Sunday night's debate found Shamie hard-pressed to dig his campaign out from the burden of Reaganomics.

At one point, he was asked by a reporter on the panel which elements of the Reagan policy he supported and which he opposed.

"When President Reagan says reduce taxes, I cheer," Shamie said, but he said he opposes presidential efforts to cut loans to students and other social programs.

Kennedy attacked Reagan's tax cut as "trickle down" economics, and he later challenged Shamie's sympathy for proposals to replace the graduated income tax rate with a single flat rate.

This prompted Shamie to define his philosophy:

"Trickle down -- that bothers me. You come to my company and talk about trickle down. I call it trickle up!"

Much of the debate focused on proposals for a mutual freeze of nuclear weapons, which Kennedy has championed.

"If it can't be verified, then it won't be frozen," Kennedy said. He described the strategic balance of the United States and the Soviet Union by saying:

"It's like two individuals in a basement standing up to their waists in gasoline. One has nine matches, one has eight matches. Defense Secretary Caspar W. Weinberger would like to give them 20 matches. It's time to say enough is enough."

Shamie said that he also favors a freeze as long as there is on-site inspection. But he added: "Senator, how would your reelection prevent nuclear holocaust?"

For the next several questions, on topics dealing with Social Security and national health insurance and defense cuts, each returned to the nuclear freeze.

Shamie said there must also be on-site inspection for underground testing because he didn't think any other form of verification could be accurate. Kennedy responded that on-site inspection does not help to detect underground tests, that sophisticated sensor equipment is necessary.