Shigella infection causes diarrhoea and is caught from contact with the faeces (poo) of an infected person. You can pick up the bacteria if you drink water or swallow food that is contaminated with faecal matter. This isn't common in the UK and is often associated with overseas travel.
You can also pick up the bacteria if you get faecal matter in your mouth during sex - for instance, through rimming (licking) or fingering the anus. Around half of shigellosis cases seen in the UK are caught this way. Gay and bisexual men are particularly at risk.