This is a pretty classic programming question, but I think it is a very common one for the Bitcoin community, and would be helpful to have the code publicly available.
My preference is for a php script.
Bitpay publishes it's exchange rates here: https://bitpay.com/api/rates
If an item is $10 USD, how would I do the following?
1) extract the BTC/USD exchange rate from the array at this URL
2) Define the price, then divide by the exchange rate
3) Display the BTC price in an HTML page?