The lobbyists got to S. Frank Shore this week long before he had a chance to cast his first vote as a freshman member of the Maryland Senate. First the teachers got to him, then the AFLCIO, then the right-to-lifers, then the veterans and then some more labor leaders.

By the time Shore went home last night, his office at Wheaton Plaza was stacked with notes and messages, his voice was cracking, and he had the feeling that he was -- for the moment, at least -- a very popular man.

He also had the feeling that he would vote for Sen. Edward T. Conroy (D-Prince George's) over Sen. James Clark Jr. (D-Howard) next Monday afternoon when the Senate elects a president for the 1979 session. And that is precisely what all those lobbyists were asking him to do.

"For a time I was saying I would vote for Clark along with the other Montgomery County senators," Shore conceded yesterday. "But then I got an unbelievable number of calls from these groups. And they're my friends, they're in my camp, they're the people who got me here. When they said they wanted Conroy, I decided, 'Hey, I'm with you.'"

The courting of S. Frank Shore is not unique. He is but one of dozens of Democratic senators -- newcomers and veterans -- who have been caught up in a surprisingly fluid and hard-fought struggle for Senate president, the most prestigious and powerful position in the General Assembly.

Clark, who narrowly lost a bid for the presidency four years ago when Gov. Marvin Mandel intervened on behalf of Sen. Steny H. Hoyer, and Conroy, who is attempting to keep the post in the Prince George's delegation, have been stalking votes day and night -- putting together a geographic coalition here, promising a leadership position there.

At various times over the past week, both Clark and Conroy have claimed a hold on the 21 votes needed for victory, but the outcome is still uncertain and the incessant politicking has shifted the balance from one man to the other almost daily.

At the beginning of the week, for example, Clark was counting on a bloc vote from the five Montgomery County senators. Then Shore defected as a result of the lobbying pressure and another Montgomery County senator, Victor L. Crawford, indicated he might abandon Clark after Conroy said he would make him the Finance Committe chairman and deputy majority leader.

Even special interest groups that normally stay away from the legislature's internal political battles have entered this one. Labor leaders, veterans and right-to-life supporters have been quietly trying to round up support for Conroy, who consistently backs the legislative goals of their groups.

Some of the most intense lobbying on Conroy's behalf comes from members of local and state teachers' associations who consider Clark unfriendly to their aims. He floor-managed a bill last year to reform the teachers' pension program and has sponsored legislation to do away with tenure rights.

"The one thing Ed's got going for him is that a number of senators are close to the same special interest groups that he's close to," said Sen. Thomas V. (Mike) Miller, Jr.

The involvement of special interest groups has backfired among some senators who regard the constant telephone calls as undue interference. "It's no one's business who runs the Senate of Maryland except the senators," said Sen. James C. Simpson (D-Charles), who is backing Clark.

The contest has been unusually chaotic because of the leadership vacuum created by this fall's election. No single senator has emerged with the popularity and political strength to replace Hoyer, who gave up the presidency to run unsuccessfully for lieutenant governor. Roy N. Staten, the Senate majority leader since 1974, retired this year.

The legislature is also reorganizing itself for the first time in recent memory without interference from the governor's office. Governor-elect Harry R. Hughes, who served as Senate majority leader in the 1960s, says he believes in legislative independence and promised to keep hands off the leadership fights.

It was far different four years ago when Mandel watched a four-man race develop for the Senate presidency before interceding. Clark had collected enough votes to defeat Hoyer, Staton and Baltimore Sen. Harry J. McGuirk until Mandel used his influence to turn the victory for Hoyer. Clark and McGuirk were rewarded with committee chairmanships.

This time it has been left to Conroy and Clark to shape the Senate's leadership. It is this power to select chairmen who control the flow of legislation that makes the presidency such an important job. Both candidates have used their appointment powers as bargaining chips in forming a majority to back them for president.

Clark first tried to woo the Montgomery County senators by offering them their choice for chairman of the influential Budget and Taxation Committee, which handles the state's fiscal bills. It was up to the delegation, he said, to choose among its two senior members, Crawford and Sen. Laurence Levitan.

Clark, a farmer from Howard County whose senatorial district includes a portion of Montgomery County, picked up a pair of votes each from Baltimore and Anne Arundel counties by promising committee leadership positions to one senator from each of those counties. Conroy, meanwhile, has captured most of the black votes by promising to make Baltimore Sen. Clarence W. Blount chairman of Budget and Taxation, thus elevating him to be the Senate's first black committee chairman.

The emergence of Conroy as a possible Senate president has surprised some of his Prince George's colleagues, who, although pledged to support him, never thought he had much of a chance to win.

"I don't think Ed had it going until McGuirk took himself out of the race last week," said one Prince George's senator. "Then some people realized that Conroy was the only alternative to Clark, and he began moving. To tell the truth, some of us thought Ed was on a lark."