Before he met Sam, Shanahan had been married once before, but because his wife could not deal with the stress and fear of being the wife of a cop, she asked for a divorce. He said that he never blamed her for doing it.
Pete Shanahan was working on a case in Colorado Springs when his friend, Mark Carter, set him up with his sister, Major Samantha Carter. They continued seeing one another beyond that first date. Soon enough, however, Shanahan became suspicious of Sam's strange work hours and her project deep within Cheyenne Mountain. He called Special Agent Dave Farrity, a friend he had in the FBI, and asked him to do a background check, which resulted only in vague information that Sam was involved in something that was considered top secret for the government. Still curious, Shanahan began to follow Sam, watching her movements. He eventually saw her become involved in a firefight with Osiris and entered the fight, getting shot for his trouble. After all he had seen, Sam was given permission to inform Shanahan about the true nature of her job, telling him about the Stargate program. (SG1: "Chimera")
Shanahan's relationship with Sam continued to blossom over the next year, and eventually he asked her to marry him. She told him she had to think about it. Meanwhile, she asked him for his help in the investigation to prove that Teal'c did not kill Doug McNair. After seeing the positioning of the body, he believed that the crime scene had been staged and found that a nearby apartment had been used to spy on Teal'c. He had an idea to check the local pizza places for new repeat customers and got the license plate of the vehicle. They traced the car to a building and he joined the raid with Sam and found Krista James and Dr. Daniel Jackson but The Trust personnel were gone. After the raid, Sam said yes. (SG1: "Affinity")