It sounds like you chose 'Import in Place' when you added the photos. For future reference, you want to choose 'Copy Photos'.
If this assumption is correct, then you have a chance at recovering the files, as long as you haven't continued to use the memory card. There are several duplicates of this question, you are facing a simple 'recover deleted files' problem already answered here. I've used
testdisk following the how-to linked from that answer and it's pretty easy. I recovered all the files no problem. TestDisk is in the Software Center, you don't need to download it from a third-party site.
The only other thing to check is where you have Shotwell set to import to. In the remote chance that you did import properly, but then disconnected the destination drive, check Shotwell's preferences in
Edit -> Preferences -> Library (tab) -> Library Location -> Import photos to: and make sure that is set to the Pictures directory, or some other location that is mounted. If you did a normal install of Ubuntu onto a single hard drive (this is the most common setup), then you can ignore this entire paragraph and just hit the link to the TestDisk answer in the paragraph above. Good luck!