Answer: Yes, it is a compound sentence.
Step-by-step explanation:
The sentence can be broken up into two separate sentences:
“We ran to the store.” and “We forgot our money.”
However, the word but is used to conjoin the sentences together, making it a compound sentence.