Shin hit three bogeys on the front nine in a three-over-par 75 to finish on nine under.
But that still left her two shots in front of Kim, who carded an impressive 68, with Thailand's Pajaree Anannarukarn a further two strokes behind in third place
Shin made three successive bogeys from the sixth to the eighth but restored her fortunes with two birdies after the turn.
She also dropped shots on the 16th and 18th but by then Shin was safely clear as she completed a wire-to-wire win.
This was Shin's first title in more than a decade and only her second on the LPGA Tour in 368 attempts, with the 33-year-old in tears after her final putt dropped on the 18th hole.
"My first one didn't really feel like a win at the time," said Shin, whose maiden title came at the Volunteers of America Texas Shootout in 2016.
"I didn't feel like I deserved it. It felt very accidental.
"But this one definitely feels a lot different. This one feels like I earned it. I worked hard for it."
Only 10 players broke par after four rounds, with Nelly Korda of the United States, who has won two of the four majors played this year, finishing on two over for a share of 16th place after a round of 69.
The final major of the year - the women's golf circuit has five compared to four for their male counterparts - starts on Thursday, when the Women's British Open gets underway at Royal Lytham and St Annes in northwest England.
"We experienced everything this week - sunshine, a little bit of warmth, and sideways rain, gusty winds, but that's a given out here," said Korda.
"So (I am) just trying to get into the mindset for next week. There's so many things that are going on during your shot that you really have to stay committed."
