The 29-year-old, who moved to St Mary's two years ago from Hull, has scored 21 goals in 73 appearances for Saints.
"I'm delighted
I'm excited to be part of what could be a big future in the next four years for this club," Long told saintsfc.co.uk.
"I love it here, the set-up, the training ground, the lads as well - everyone around the club.
"It's a real family feel, and I feel like I'm a big part of that and I feel like I'm playing my best football here as well.
"I've enjoyed every minute down here
I'm happy, my family are happy, and it's a good place to be."
Executive director of football Les Reed said Long's significance to the team was reflected in his new contract.
"Shane has been an important asset to the team ever since his arrival at the club in 2014 and he was an influential part of our record-breaking Premier League campaign last season," he said.
"His experience and character also make him an extremely valuable member of the squad off the pitch, as well as on it, and I am delighted we have strengthened our commitment with him.
"Shane is the latest in a significant number of first-team players to have signed new contracts with the club in recent weeks and months, indicating the players' belief that there is more to come, while further strengthening the core of our squad as we move into what promises to be another memorable campaign.
"Shane is one of many exciting attacking options that we have at our disposal, and he will no doubt play an important part in the season and the years ahead."
Source : PA
Source: PA