I always end up getting these frigging combinatorics problems wrong but what I think the answer here is is

$12! 4^{12}$

You first select a book from the 12 and put it on one of 4 shelves. There are 12x4 ways to do this.

Then you select a book from the 11 and put it on one of 4 shelves. There are 11x4 ways to do this.

And so on. The final product is

$(12\cdot 4)(11 \cdot 4) \dots (1 \cdot 4) = 12! 4^{12}$