There are countless numbers of souvenir shops all over the 'dam. 99% of them sell pipes, bongs, and anything else you could want/need. A lot of the pipes are Amsterdam specific as well; usually sporting the XXX logo or something of that nature. They are cheap and plentiful. You'll probably trip over a few here and there
If you're asking about Spacecakes made with weed then yes they are perfectly legal and many, if not most, of the coffeeshops sell them. Depending on your tolerance level they may not have any effect on you, though. Supposedly, a few shops have very decent ones that will get you pretty baked, but most are quite weak. I believe
La Tertulia has decent cakes. Someone else will chime in and give you some others.
Oh, and as long as you don't use your souvenir pipe you should have no problem getting it through customs/borders. A clean pipe could be used for "anything", right
