What is the version of the following sentence with correct punctuation?

The EU budget doesnt aim to redistribute wealth but rather to focus on the needs of all Europeans as a whole
The EU budget doesn't aim to redistribute wealth, but rather to focus on the needs of all Europeans as a whole.