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 black and white and color tinted silent western/adventure/romance set at the time in southeast California when engineers dug a canal from the Colorado River to irrigate the desert but then the river level rose so much from heavy rain and snowmelt that it overwhelmed the canal and flooded into the below-sea level Imperial Valley for two years, forming the Salton Sea. That happened in 1905, only about 20 years before this movie was made, but apart from a few scenes shot in the Algodones Dunes and the Imperial Valley, most of it was shot in the Black Rock Desert of Nevada, now home to the Burning Man festival every Summer, so we don't get to see any of the Salton Sea. They stuck a couple of fake saguaro catuses on the dry lake and called it the Colorado Desert. Vilma Banky is Barbara and a very young Gary Cooper is also in it, but none of that has anything to do with the rattlesnake scene. It's a comic scene that happens at the beginning of the movie at a spring in the desert when two of the men have an argument and start wrestling. When the big guy bends the legs of the small guy, Tex, behind his head, Tex looks between his legs and sees a rattlesnake nowhere near him. He unholsters his gun and shoots the snake, firing between both of their legs. The other guy faints when he hears the gun, thinking he was shot. The snake scene does nothing to advance the plot, really, it justs provides a laugh and lets us know that we're in the desert where there are dangerous rattlesnakes which all must die, because that is the rule of the west, in movies.
The snake they used is a Great Basin Rattlesnake, the rattlesnake found in the Black Rock Desert. I've seen lots of them there. At first we see a live snake, then a coiled dead snake is either shot or blown up by a small explosive charge. The snakes look the same, so they might have killed the live snake, then coiled it up for the killing scene, but that's not possible to say for sure.