Prime Minister James Callaghan yesterday laid out a legislative program designed to give him an untroubled stay in office until he calls a general election, probably in the late spring.

The program, announced by Queen Elizabeth II at the ritual opening of a new Parliament, is all but bare of controversial measures. Instead, it is filled with items to woo Britain's minor parties.

Callaghan's minority Labor government needs support from the minor parties survive. More precisely, Callaghan requires eight abstentions from the 37 lesser party members to stay in power until he is ready to go. The odds are strong that he will succeed.

The queen's speech is one of the more resplendent ceremonials here. The monarch, wearing her great crown, spoke in the panelled gothic chamber of the House of Lords before peers and peeresses in scarlet robes trimmed with ermine. Members of the House of Commons stood in the rear of the chamber.

Callaghan gave the queen almost nothing of interest to say about foreign affairs, one measure of the diminished role Britain plays in global matters.

On the domestic front, the only controversial item she announced is a Labor plan enabling workers to fill a minority of seats on the boards of large corporations. But Callaghan and his team have already made clear this move toward worker democracy slowly will take place over several years.

The speech suggests he is banking on the present boomlet to continue until polling day, with unemployment falling slightly, incomes rising and inflation holding steady at about 8 percent. Then Callaghan evidently hopes the nation will forget three years of falling income under Labor and remember only the relative success of the government's last 18 to 21 months.

His biggest danger does not lie in Parliament but from unions determined to breach his 5 percent pay limit. Some 57,000 Ford workers are in the sixth week of a strike and have already turned down an offer of about 15 percent.

When Ford settles, the limit will be breached. Callaghan must then decide whether or not to invoke sanctions - much like those announced by President Carter - against the company. If he does, other industrialists will be furious. If he doesn't he invites other unions to smash his wage curb and launch Britain on a new cycle of galloping inflation.

The prime minister's one new proposal to deal with unemployment, which is close to 6 percent, is a still uncompleted scheme for sharing work. The government plans a new subsidy for employers who hold workers for part-time jobs rather than making them jobless.

The most naked portions of the address held out bait for the minority regional parties. Their assigned role is to keep Callaghan in office when the house takes a vote of confidence next week.

The 10 Ulster Protestants were promised four to six more seats in that troubled and underrepresented region. The 14 Scottish and Welsh nationalists were told their ancient kingdoms will be able to vote for limited home rule when the new national voting register is published on Feb. 16.

Callaghan offered nothing to the Liberals. Once a great ruling party, but now reduced to 13 members. Their votes kept the government alive in its darkest days here, but they are a spent force now, facing near-extinction at the next poll.

A general election must be held next October, five years after the last one. But Callaghan might well choose June 7, the day the nation also votes for deputies to the largely powerless European parliament in Strasbourg, as election day.