The Senate Foreign Relations Committee gave overwhelming approval yesterday to a $22 million aid program for police forces in four Central American nations, while attaching stiff human rights conditions and barring any intelligence agency role other than U.S.-based training.

The 15-to-1 vote came on a compromise worked out in advance between Republicans, who backed President Reagan's call for a broader $54 million program to combat terrorism in the region, and Democrats, who feared that the funds would be used to repress legitimate dissent. The measure is expected to be attached to the catchall spending bill that the Senate is to begin considering today.

If it is funded, the program would provide $21 million in equipment and training in counterterrorism techniques to El Salvador, Honduras, Costa Rica and Guatemala, to be allocated by the State Department, and $1 million for a regional witness-protection fund.

Funding for each country would be conditional on a presidential finding that "the security forces of such country are not engaged in systematic human rights violations," and on a quarterly General Accounting Office report on the extent of torture and human rights violations.

Lethal weapons aid would be limited to 10 percent of the funds and all aid would stop if any is used in torture. On an amendment from Sen. Claiborne Pell (D-R.I.), the measure specifically bans the purchase of electric shock batons, or cattle prods.

The lone negative vote came from Sen. John F. Kerry (D-Mass.), who argued that police in Central America are the same as the armed forces. "We are giving to the very people perpetuating these abuses," he said. Sen. Jesse Helms (R-N.C.) failed on a 14-to-1 vote to reinstate the full $54 million administration program, and also lost 13 to 2 an effort to include Panama.

Sen. Christopher J. Dodd (D-Conn.), whose amendment bars intelligence agency involvement other than training in the United States, said the measure is "a tremendous improvement" over the administration proposal.

Democrats reversed their long opposition to all police funding, he said, because "we see a real need for reform of the security forces" that training could help provide.

Congress cut off police aid in 1974 after reports of its use in torture, and this measure would be the first formal renewal.

It would also be the first noneconomic aid to Guatemala in more than a decade.