How about you verify the number of bits you need. According to your code it's 4.
There are faults in your code as strykeroz has commented on, but for a start to get 4 bits you need to accumulate the results of 4 digitalRead()s, for example
loop () {
static byte val = 0b00001000;
if (rising_edge_on_clock_pin) { // you figure out how to detect this
val <<= 1;
val |= digitalRead(pin2);
if(val | 0x80) { // flag bit has reached the top of the byte so we've done 4 iterations
Serial.print(val & 0x7F, HEX);
val = 0b00001000;
}
}
}
Rob