making the product post come up randomly

Is there a way to have the post on the front page come up randomly. I know that there is a short code that will give that function but not sure what code i will need to add to give that same functionality on the static main page?

Jafar amin

this is the code that i have added so far.

#mp-product-grid h3.mp_product_name {