Following is the relevant bit of the law:
VAT on imports and exports
For the purpose of exports between the Community and non-member countries, no VAT is charged on the transaction and the VAT already paid on the inputs of the good for export is deducted - this is an exemption with the right to deduct the input VAT, sometimes called 'zero-rating'. There is thus no residual VAT contained in the export price.
However, as far as imports are concerned, VAT must be paid at the moment the goods are imported so they are immediately placed on the same footing as equivalent goods produced in the Community. Taxable people registered for VAT will be allowed to deduct this VAT in their next VAT return.
VAT on goods moving between Member States
No frontier controls exist between Member States and therefore VAT on goods traded between EU Member States is not collected at the internal frontier between tax jurisdictions.
Goods supplied between taxable persons (or VAT registered traders) are exempted with a right to deduct the input VAT (zero-rated) on despatch if they are sent to another Member States to a person who can give his VAT number in another Member State. This is known as an "intra-Community supply". The VAT number can be checked using the VAT Information Exchange System (VIES).
The VAT due on the transaction is payable on acquisition of the goods by the taxable customer in the Member State where the goods arrive. This is known as "intra-Community acquisition". The customer accounts for any VAT due in his normal VAT return at the rate in force in the country of destination.
The whole document on taxation and customs union can be read at:
General overview - European commission