A woman has been accidentally shot and killed at a Walmart store in northern Idaho when her two-year-old son pulled a loaded handgun from her purse that then went off, according to a county sheriff said.

The 29-year-old woman was shopping at a Walmart in Hayden, Idaho with the toddler seated in her shopping cart when the incident occurred, Kootenai County Sheriff Ben Wolfinger said in a written statement.

Sheriff's officials said investigators were still processing the scene of the shooting, which took place shortly after 10am local time (5pm Irish time) in the store's electronics department.

The woman was shopping with her children and other family members at the time of the shooting.

"Once on scene, deputies found a 29-year-old victim was deceased from an apparent gunshot wound," the County Sheriff said in the statement.

"Her son was seated in the shopping cart and accessed the victim's concealed weapon from her purse and discharged it, striking the victim," it added, noting that the shooting appeared to be accidental.

Sources told a local television station that the woman, who was spending the holidays in the area, had a concealed weapons permit.

The woman's identity was withheld by authorities pending notification of next of kin.

Walmart spokeswoman Brooke Buchanan said: "A very sad incident occurred at our store today in Hayden involving the death of a female customer.

“We are working with the Kootenai Sheriff's department as they investigate what happened," she added.

Ms Buchanan said the store had been closed and would remain so until further notice.

Hayden is a community of about 10,000 people located in Kootenai County, north of Coeur d'Alene.