That’s the situation Taco Bell had to deal with last month when such a photo went viral on Twitter and Facebook. Even though company officials specified that the shells were never served and that they were on their way to the garbage after being used in training, consumers still seemed to think the photo was, well, disgusting.

Although this particular incident caused quite a stir, the problem isn’t isolated to Taco Bell. In June, a photo of a Wendy’s employee eating ice cream out of the dispenser also went viral. And earlier this year, a KFC employee was fired after a photo of her appearing to lick a plate of mashed potatoes surfaced on the Internet.

On Monday a video posted by a Golden Corral employee near Port Orange, Fla., made the rounds on social media. In the video, an employee says he is ashamed of the food his restaurant serves, and that he would never eat the food himself. Next, he walks outside to show meat, particularly the company’s all-you-can-eat ribs, stored near a dumpster.

Franchisee Eric Holm of Metro Corral Partners in Florida was quick to note to the public that none of that food was ever served to a customer.

“To be honest, this stuff has been going on since I started in the restaurant business in 1975,” said Kevin S. Murphy, an associate professor specializing in foodservice and lodging at the Rosen College of Hospitality Management at the University of Central Florida. “Now, you have YouTube and camera phones. It just makes it easier for disgruntled employees to do stupid stuff.”

Given the severity of these issues, it behooves restaurateurs to have measures in place to help prevent these events — and to handle them properly and quickly if they do happen, said Carrie Luxem, president at consulting firm Restaurant HR Group.

“It’s about taking the time to make sure that the people you’re hiring know what the expectations are and that you’re not going to tolerate things like that,” she said of Taco Bell’s shell-licking incident.

Fostering an open culture

Eric Chester, an employee engagement expert and author of “Reviving Work Ethic,” noted happy employees don’t want to lash out; they want to keep their jobs.

Chester said that as an employer, it’s important to know your employees’ desired career path, whether it’s in the restaurant industry or not. If there’s a greater relationship between manager and subordinate, rebellious behavior against the company’s goals is less likely to occur, he said.

“[Employees] sometimes don’t realize that what they’re doing there makes the next opportunity,” Chester said. “You may not work here forever, but we can prepare you for the next step in life. If it’s a step in my career, I don’t want to trash that.”

Additionally, Restaurant HR Group’s Luxem noted that employees just want to feel like they’re a part of something special. “People work for people, not companies,” she said. “If they like the people they’re working for, they’re not going to act out like this…. You want to show them that you believe in them but that you’re also going to correct bad behavior.

Helping employees understand that the business is a family, a place where they belong, can also help alleviate pressure and anger before it becomes and issue, Chester said. “Keep an open-door policy that [says], ‘If things aren’t working for you, I want to solve it,’” he said.

Chester added that some employees may have posted the videos because they “felt like they had no other choice,” which he noted was likely the root of the problem.

Creating and enforcing policies

Although making people feel like they belong to a community is important, another key to deterring poor employee behavior is by taking the full force of action against anybody who doesn’t comply, Chester said.

Consistent, meaningful actions against those who break the employee code will drive home the point that you’re serious about your brand’s reputation, he noted.

“Let your employees know that [unprofessional behavior] isn’t going to be tolerated,” he said. “You want them to pause and think about their actions and know that this could come back to them.”

Cornell University professor Alex Susskind, who specializes in food and beverage management, added that it’s often important to drive the point that food safety isn’t something to joke about — even if you’re an 18-year-old college student. “It gets down to getting your employees to understand [that this is serious], ” he said. “’Hey, this is a job, and if you don’t follow these procedures, none of us will have a job.’”

This language should be in training materials, Susskind said, especially because if an event like this does occur, the company is then able to take swift action, discipline the employee, and show the public that this was never part of the company’s internal culture.

“The more information employees have about what’s good and bad behavior, the better,” Susskind said.

Meghan Griffiths, an HR generalist at Restaurant HR Group, said all of these rules fall under a basic code of conduct. “It would be combined between the safety and security policies,” she said. “It’s just about holding people consistently accountable.”

Of course, she added, it also helps to hire the right people in the first place.

“We always advise managers to take their time and check references,” she said. “I think a lot of times in the restaurant industry employees are hired on the spot. Even though we know restaurant operators are very busy, it’s worth the extra time.”

Planning for crisis management

“There are going to be bad employees. Even the best manager in the world can’t control every little thing, ” said Susskind.

In other words: This stuff will happen to some restaurateurs, no matter what policies are in place. So it’s best to be prepared to handle a public relations crisis.

Susskind said that the public isn’t always very forgiving. However, if a restaurateur is vocal about the problem, why it’s a problem and then apologizes, the damage can be mitigated.

Taking quick action to avoid a prolonged public relations debacle is crucial, Luxem said. Referring to the Taco Bell shell-licking photo, she said: “I can’t imagine any reasonable person who would say this wouldn’t be grounds for immediate termination.”

That’s why it’s important to have clear rules in the training manual, Luxem said. There’s no question about what to do—just take care of it.

“You’re never going to put in a policy that says ‘don’t lick the tacos,’” she said. “But you take very swift and consistent action, depending on how severe the circumstance is.”