Not too many Shakespearean actors get their stage direction by sniffing out sausages.

But that’s how “Spot” learned where he was supposed to go in Shakespeare in Love, a play based on the award-winning 1998 film, which opened July 19 as part of the Illinois Shakespeare Festival. The dog plays a rescue dog, not exactly a stretch for the wire terrier-beagle mix who was born in a shelter.

In the final scene, Spot saves a young Will Shakespeare, but that took a bit of rehearsal too. Spot wasn’t happy when his new friend was threatened with a knife. He had to be taught the knife wasn’t real.

Animals are rare in festival productions, there was a dog in Two Gentlemen of Verona, and a pig in Taming of the Shrew. “When the script calls for a dog, you have to have a dog,” Artistic Director John Stark said. Open auditions were held for a small- to medium-sized well-behaved dog, and Dogtor Who, the dog’s real name, quickly won over casting directors.

“He has that certain look on his face and an ability to do tricks and mind,” Stark said. “All this together made for a perfect package.”

Dogtor Who’s owner, Allie Fekete, trains dogs and has taught the scruffy 3-year-old about 70 tricks, including how to bow. The homeschooled high-schooler started Canine Initiative Training in Tremont, teaching obedience, manners, and tricks. Appearing in Shakespeare came with a big time commitment, two months of rehearsals and 10 performances. All for … treats.

When Fekete brought the dog to meet the cast for the first time, she did a little training with the actors.

“Dogs are like humans, they don’t like to be rushed,” she said. “Get down on his level, or have him come to you. Terriers are known for their attitudes. If he gives you attitude, don’t be offended. I have treats, which will help with that.”

In his first scene in the romantic comedy-drama, acting major Owen McGee is trying to teach Spot a trick, which he is supposed to fail.

“That’s hard to do with a trained dog,” said McGee, who’s never worked with a dog before but has a rescue greyhound at home.

Between performances, Spot returns to the country dog he is. He roams the woods, swims in creeks, and arrives home with burs. Although he had the scruffy look down the day after a hike, “This is what he looks like after being groomed,” Fekete said.

Shakespeare in Love opens July 19 and is performed in rotation with Merry Wives of Windsor and Henry V through August 11. For more information, visit IllinoisShakes.com.