CD4021 shift in register

Hi guys,

i am short for pins on my uno and need to read the state of 7 push buttons. I have chose to use the CD4021 shift in register. However, i am really struggling to understand how to translate this in the code.

Could someone please help me in how to read the serial data coming to the arduino uno?

cheers guys

Post the your circuit diagram and your code.