Some of these pictures and descriptions may give away plot details that you might not want to know before watching the film.
This is a Louis L'Amour-penned western made by the English and filmed in Spain.
A between-Bond movies Sean Connery, as Shalako, is paired up with Brigitte Bardot, who speaks only about ten lines which she can barely pronounce, but she's not in this movie for her talking. Considering all of the great Spaghetti Westerns and other revisionist westerns that had been made by 1968, this one comes off as a bit too old-fashioned, especially the singing cowboy theme song which sounds like a very bad TV show theme. "Shalako, Shalako... born on the wind to follow the sun...he rode wild country down New Mexico...would gamble his life to own a woman!" etc. But there are some interesting comments about savages vs. civilized Europeans and other class and cultural differences in the West. As an example, one of the less-likable aristocratic women is choked to death by an Apache with her own diamond jewelry which she tried to give him to spare her life.
The snake scene happens when Shalako is taking the remaining members of a hunting party of foreigners trespassing in Apache territory away from the Apache warriors who have killed all the others (aristocrats who dressed up in formal wear for dinner in the middle of the desert.) Shalako has just humiliated the Baron, the leader of the hunting party who is an arrogant stubborn man. His decision to defy Shalako got everybody else killed. The Baron wanders near a rattlesnake. Shalako tells everybody to freeze, throws his hat onto the snake, picks it up by the tail, and whips it to death on the ground. Then he tosses the snake away.
The scene is supposed to show us how experienced and brave and resourceful Shalako is, and that he is still willing to protect the Baron, but it just shows me how stupid the screenwriters are (and maybe the novelist) to treat a rattlesnake as if it was a timebomb instead of a living animal. Instead of killing the snake, it would have been easy to avoid it or to simply scoot it away with a stick or rifle, but of course, the audience is paying to Sean Connery be an action hero, not to act rationally. So Shalako kills the snake in absolutely the stupidest way possible. His risk of being bitten by the snake is much higher than it would be just leaving it alone. But he's "Shalako, Shalako, born on the wind to follow the sun...."
As in most movies, we first see a stock shot of a live rattlesnake (this one looks like an Arizona Black rattlesnake) then we see Connery holding and whipping a fake snake, probably made of rubber or. (A dead snake would disintegrate quickly, so I don't think that's waht they used.) The snake carcass he throws to the ground looks nothing like the stock rattlesnake we saw at first. It looks more like a large constrictor such as a python.